gpt4 book ai didi

.htaccess - 无效命令导致 htaccess 内部服务器错误 'Header'

转载 作者:行者123 更新时间:2023-12-03 05:07:31 24 4
gpt4 key购买 nike

我有一个 htaccess 文件,它在主机上完美运行,但是当我将其放在本地时,它向我显示此错误:

Internal Server 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.

我在错误日志文件中发现了此警报:

[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 文件代码:

  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 运行,我也启用了重写模块!!!

那么问题是什么?!!

最佳答案

Header 指令位于 mod_headers apache 模块中。您需要确保该模块已加载到 apache 服务器中。

关于.htaccess - 无效命令导致 htaccess 内部服务器错误 'Header',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10185717/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com