dqhdpppm02183 2015-03-10 06:28
浏览 37
已采纳

服务器错误! .htaccess文件的错误500

I work with Opencart shopping system And have This .htaccess File:

# 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 ?!

  • 写回答

1条回答 默认 最新

  • doumouyi4039 2015-03-10 20:13
    关注

    [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

    This means you don't have mod_expires loaded. You need to uncomment out that line in the httpd.conf or use a2enmod if you have that. Make sure to restart apache.

    See this answer: Apache crashing when I add Far-Future Expires clause from Rails Guide

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥20 CST怎么把天线放在座椅环境中并仿真
  • ¥15 任务A:大数据平台搭建(容器环境)怎么做呢?
  • ¥15 r语言神经网络自变量重要性分析
  • ¥15 基于双目测规则物体尺寸
  • ¥15 wegame打不开英雄联盟
  • ¥15 公司的电脑,win10系统自带远程协助,访问家里个人电脑,提示出现内部错误,各种常规的设置都已经尝试,感觉公司对此功能进行了限制(我们是集团公司)
  • ¥15 救!ENVI5.6深度学习初始化模型报错怎么办?
  • ¥30 eclipse开启服务后,网页无法打开
  • ¥30 雷达辐射源信号参考模型
  • ¥15 html+css+js如何实现这样子的效果?