[英]Server error! error 500 for .htaccess file
I work with Opencart shopping system And have This .htaccess File: 我使用Opencart购物系统,并具有以下.htaccess文件:
# STARTNITRO
RewriteRule .* - [E=HTTP_IF_MODIFIED_SINCE:%{HTTP:If-Modified-Since}]
ExpiresActive On
#CSS JS XML TXT - 1 WEEK
<FilesMatch "\.(xml|txt|css|js)$">
Header set Cache-Control "max-age=604800, public"
ExpiresDefault "access plus 1 week"
</FilesMatch>
#JPG JPEG PNG GIF SWF SVG - 1 MONTH
<FilesMatch "\.(jpg|jpeg|png|gif|swf|svg|JPG|JPEG|PNG|GIF|SWF|SVG)$">
Header set Cache-Control "max-age=2674800, public"
ExpiresDefault "access plus 1 month"
Header set Last-Modified "Wed, 05 Jun 2009 06:40:46 GMT"
</FilesMatch>
#OTF WOFF TTF ICO PDF FLV - 1 MONTH
<FilesMatch "\.(otf|ico|pdf|flv|woff|ttf)$">
Header set Cache-Control "max-age=2674800, public"
ExpiresDefault "access plus 1 month"
</FilesMatch>
# ENDNITRO
# STARTCOMPRESSNITRO
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteRule ^(\/?((catalog)|(assets)).+)\.css$ assets/style.php?l=9&p=$1&c=604800 [NC,L]
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteRule ^(\/?((catalog)|(assets)).+)\.js$ assets/script.php?l=9&p=$1&c=604800 [NC,L]
Now, When i see my page i see error : 现在,当我看到我的页面时,我看到错误:
Server error! The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there was an error in a CGI script.If you think this is a server error, please contact the webmaster. Error 500
how do can i fix this error ?! 我该如何解决此错误?
[Mon Mar 09 23:08:08.289609 2015] [core:alert] [pid 4856:tid 1668] [client ::1:53855] C:/xampp/htdocs/shop/.htaccess: Invalid command 'ExpiresActive', perhaps misspelled or defined by a module not included in the server configuration [2015年3月9日星期一23:08:08.289609] [core:alert] [pid 4856:tid 1668] [client :: 1:53855] C:/xampp/htdocs/shop/.htaccess:无效的命令“ ExpiresActive”,也许服务器配置中未包含的模块拼写错误或定义
This means you don't have mod_expires loaded. 这意味着您没有加载mod_expires。 You need to uncomment out that line in the httpd.conf or use a2enmod
if you have that. 您需要在httpd.conf中取消注释该行,或者使用a2enmod
。 Make sure to restart apache. 确保重新启动apache。
See this answer: Apache crashing when I add Far-Future Expires clause from Rails Guide 看到这个答案: 当我从Rails Guide中添加Far-Future Expires子句时,Apache崩溃
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.