2013-04-03 71 views
0

當我在localhost上查看我的網站時,它工作得很好。當我嘗試打開它時,我的網絡IP (192.68.x.x) or 127.0.0.1即時通訊錯誤500內部服務器錯誤。香港專業教育學院檢查Apache日誌,這是錯誤:htaccess在localhost上運行良好,在127.0.0.1上給出錯誤

Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace. 

我就這麼讀到了同樣的錯誤,我也得到了一些htaccess的例子,它應該工作,試圖「M所有,但我只是不斷收到郵件,在某些情況下,http://localhost也停止工作。我的htaccess將所有內容都重定向到我開始我的網站課程的index.php。

這裏是我的htaccess:

RewriteEngine on 
RewriteBase/
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule ^(.*)$ index.php?param=$1 [QSA,L] 

任何人都可以點我到正確的方向?謝謝!

+0

使用 'LogLevel的調試',以獲得回溯。 – Petr

+0

我該如何使用它? –

+0

請參閱http://stackoverflow.com/questions/2540738/what-is-loglevel-debug – Petr

回答

0

1 /檢查您的主機文件中是否包含此規則:127.0.0.1 localhost

2 /檢查Apache rewrite_module是否已激活。

3確保您的項目位於子文件夾中(讓我們以mysite/爲例)。

4 /設置你的根htaccess的(/.htaccess):

Options -Indexes +FollowSymlinks 
RewriteEngine On 
RewriteBase/

5 /設置你的項目的htaccess(/mysite/.htaccess):

RewriteEngine on 
RewriteBase /mysite/ 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule ^(.*)$ index.php?param=$1 [QSA,L] 
相關問題