2011-07-11 52 views
2

IM這裏面臨關於我的.htaccess文件的一個問題是文件問題.htaccess文件

<IfModule mod_rewrite.c> 
Options +FollowSymlinks 
RewriteEngine on 
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f 
RewriteRule ^category/([^/\.]+)/?$ index.php?category=$1 [L] 
RewriteRule ^department/([^/\.]+)/?$ index.php?department=$1 [L] 
RewriteRule ^brand/([^/\.]+)/?$ index.php?brand=$1 [L] 
RewriteRule ^product/([^/\.]+)/?$ index.php?product=$1 [L] 
RewriteRule ^basket/([^/\.]+)/?$ index.php?basket=$1 [L] 
</IfModule> 

中的代碼,一旦我加載網頁它給了我這個錯誤

Internal Server Error 

The server encountered an internal error or misconfiguration and was unable to complete your request. 

Please contact the server administrator, [email protected] and inform them of the time the error occurred, and anything you might have done that may have caused the error. 

More information about this error may be available in the server error log. 

和一旦我刪除.htaccess文件內容的網站恢復正常

+0

這是因爲期權+的FollowSymLinks的一次,我刪除了它回到正常工作謝謝 – Marco

回答

3

那些「內部服務器錯誤」消息在屁股痛;他們幾乎沒有任何錯誤信息一樣無用。

.htaccess文件調試程序:

  1. 註釋掉每行。
  2. 取消註釋第一條註釋行。
  3. 試一試。
  4. 有用嗎? GOTO第2步
  5. 不起作用?檢查服務器的日誌以獲取更多詳細信息。
0

工作,確保您保存您的.htaccess文件與正確的編碼:我建議ANSI如Apache可以有問題,如果它不是。

0

請檢查該目錄配置了AllowOverride設置爲選項所有

+0

我有根沒有訪問帳戶的共享主機 – Marco

+0

關於你自己的評論,你可以假設沒有配置目錄以允許覆蓋選項,所以服務器錯誤是嘗試做不允許的事情的結果。 –