gpt4 book ai didi

php - WAMP .htaccess 在从 XAMPP 移动后出现内部服务器错误

转载 作者:IT王子 更新时间:2023-10-29 00:06:47 24 4
gpt4 key购买 nike

不久前,我从xampp转到了wamp
现在当我进入我的网站时出现了这个错误:

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.

当我在 .htaccess 中使用这段代码时:

<FilesMatch "\.(pdf|swf|js|css)$">
Header set Cache-Control "max-age=604800"
</FilesMatch>

<FilesMatch "\.(html|cgi|php|htm)$">
Header set Expires "Thu, 01 Dec 2003 16:00:00 GMT"
Header set Cache-Control "no-store, no-cache, must-revalidate"
Header set Pragma "no-cache"
</FilesMatch>


AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html

<Files *.js>
SetOutputFilter DEFLATE
</Files>

<Files *.css>
SetOutputFilter DEFLATE
</Files>

我该如何解决这个问题?


我找到了 apache_error.log:

[Sat Jan 07 13:58:06 2012] [alert] [client 127.0.0.1] C:/wamp/www/website/.htaccess: Invalid command 'Header', perhaps misspelled or defined by a module not included in the server configuration, referer: localhost

最佳答案

在 wamp 服务器中单击 apache、apache 模块并单击(标记)rewrite_module 并重新启动 wamp 服务器,您的问题已解决

关于php - WAMP .htaccess 在从 XAMPP 移动后出现内部服务器错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8769799/

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