2014-01-14 32 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>