2017-10-14 75 views
0

我有安裝一個PHP腳本優惠券的問題錯誤文件.htacess 500內部服務器錯誤

如果負載.htaccess文件

錯誤頁面

內部服務器錯誤

的服務器遇到內部錯誤或配置錯誤,並且 無法完成您的請求。

請通過[email protected] 與服務器管理員聯繫,通知他們發生此錯誤的時間以及您在此錯誤發生之前執行的操作 。

有關此錯誤的更多信息可能在服務器錯誤 日誌中可用。

此外,遇到500內部服務器錯誤錯誤,而 試圖使用ErrorDocument來處理請求。

這是我的.htaccess文件

選項-Multiviews

# Tell PHP that the mod_rewrite module is ENABLED. 
SetEnv HTTP_MOD_REWRITE On 
RewriteEngine On 

RewriteCond %{REQUEST_FILENAME} !-d 
RewriteCond %{REQUEST_URI} (.+)/$ 
RewriteRule^%1 [R=301,L] 

RewriteRule ^(admin) - [L] 
RewriteRule ^(cache) - [L] 
RewriteRule ^(installer) - [L] 
RewriteRule ^(templates) - [L] 
RewriteRule ^(ajax) - [L] 
RewriteRule ^(plugins) - [L] 
RewriteRule ^(thumbs) - [L] 
RewriteRule ^go\.php - [L,QSA] 
RewriteRule ^confirm_subscription\.php - [L,QSA] 
RewriteRule ^rss\.php - [L,QSA] 
RewriteRule ^sitemaps - [L,QSA] 


RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule ^(.*) index.php [L] 

可能是什麼問題了嗎?

+0

如果您刪除行,直到它開始工作,哪條線特別是導致錯誤? – rickdenhaan

+0

片刻我嘗試清除行 – Danny

+0

SetEnv HTTP_MOD_REWRITE On – Danny

回答

0

您在評論中說,問題的行是SetEnv HTTP_MOD_REWRITE On,考慮到該行並從第一行的評論似乎使用的是基於這個博客帖子代碼:

Detecting mod_rewrite using PHP

由於該博客文章解釋說SetEnv HTTP_MOD_REWRITE On是PHP 版本低於4.3.2(該帖子是從2009年開始)的解決方法,您應該刪除該行,因爲現在不需要該檢測方法,而是使用apache_get_modules()爲當前版本的PHP。

另請注意,此行根本不需要使用mod_rewrite,激活mod_rewrite的是RewriteEngine On

+0

確定它是完美的 – Danny

+0

非常感謝你 – Danny