2014-01-14 66 views
0

添加此之後爲.htaccess錯誤500修改htacess

ExpiresActive On 
ExpiresByType image/gif A2592000 
ExpiresByType image/png A2592000 
ExpiresByType image/jpg A2592000 
ExpiresByType image/jpeg A2592000 

後,我曾在網站上的500錯誤。 我加在文件末尾的線條和之前有:

# BEGIN WordPress 
<IfModule mod_rewrite.c> 
RewriteEngine On 
RewriteBase/
RewriteRule ^index\.php$ - [L] 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule . /index.php [L] 
</IfModule> 

# END WordPress 

你看不出什麼問題?

+2

檢查你的Apache error.log中看看是什麼錯誤? – anubhava

+1

服務器上是否啓用了mod_expires? – Jon

+0

/usr/sbin/apache2 -l不顯示mod_expires。我認爲這是問題。謝謝 。 – 4m1nh4j1

回答

0

我也沒有看到問題,在我的.htaccess文件中有ExpiresByType多年。截至兩天前,這些行和其他一些行必須刪除我的.htacess文件,以使我的網站恢復在線狀態。其他違規行:

頭未設置ETag的

<FilesMatch "\.(gif|jpe?g|png|ico|css|js|swf)$"> 

Header set Cache-Control "public" 

</FilesMatch></code>