内部服务器错误 - htaccess的 [英] Internal Server Error - htaccess

查看:293
本文介绍了内部服务器错误 - htaccess的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有它完美地工作在主机htaccess的文件,但是当我把它放在本地,那就说明我这个错误:

I have a htaccess file that it work perfectly on host but when I put it on local ,it shows me this error:

内部服务器错误

服务器遇到一个内部错误或配置错误,   无法完成您的请求。

The server encountered an internal error or misconfiguration and was unable to complete your request.

请与服务器管理员联系,管理员@本地和通知   他们错误发生的时间,任何你可能会做   这可能造成的错误。

Please contact the server administrator, admin@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.

这个错误的详细信息,可在服务器错误可用   登录。

More information about this error may be available in the server error log.

我发现这个警报在错误日志文件:

I found this alert in error log file :

[星期二04月17日10点02分25秒2012] [警惕] [客户127.0.0.1] D:/wamp/www/jivan/sql/.htaccess:无效的命令'头',也许拼错或模块中定义不包括在服务器配置

[Tue Apr 17 10:02:25 2012] [alert] [client 127.0.0.1] D:/wamp/www/jivan/sql/.htaccess: Invalid command 'Header', perhaps misspelled or defined by a module not included in the server configuration

这是我的htaccess的文件code:

this is my htaccess file code:

  RewriteEngine On
AddDefaultCharset utf-8
RewriteRule ^([0-9-]+)/keyword_show.html$ keyword_show.php?keyword_id=$1
RewriteRule ^page_(.*).html$  page.php?url=$1
RewriteRule ^([0-9-]+)/(.*)/(.*)/(.*).html$ $2.php?advertisement_cat=$1&id=$3&pagenumber=$4
RewriteRule ^([0-9-]+)/(.*)/(.*).html$ $2.php?advertisement_cat=$1&pagenumber=$3
RewriteRule ^([0-9-]+)/(.*).html$ $2.php?advertisement_cat=$1
# cache images and flash content for one month
<FilesMatch ".(flv|gif|jpg|jpeg|png|ico|swf)$">
Header set Cache-Control "max-age=2592000"
</FilesMatch>

# cache text, css, and javascript files for one month
<FilesMatch ".(js|css|pdf|txt)$">
Header set Cache-Control "max-age=2592000"
</FilesMatch>

我的本地服务器通过WAMP运行,我启用了重写模块过!

my local server run by wamp and I enabled rewrite module too!!!

所以什么`的概率?!

推荐答案

标题指令是在 mod_headers中 Apache模块。你需要确保模块被加载到阿帕奇服务器。

the Header directive is in the mod_headers apache module. You need to make sure that module is loaded into the apache server.

这篇关于内部服务器错误 - htaccess的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆