![](/img/trans.png)
[英]Wamp, 500 Internal Server Error when IndexIgnore is enabled in .htaccess file
[英].htaccess 500 Internal server Error in wamp
嗨,我正在尝试在绝对有效的wampserver中运行我的代码时收到500 Internal server Error我的.htaccess文件位于wamp / www / site foloder中,所有其他代码也位于同一文件夹中,因此我应将站点放在。 htaccess文件,因为在线我的代码位于根文件夹我的.htaccess代码中:
RewriteEngine on
FileETag none
<IfModule mod_rewrite.c>
RewriteCond %{REQUEST_URI} /+[^\.]+$
RewriteRule ^(.+[^/])$ %{REQUEST_URI}/ [R=301,L]
</IfModule>
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/javascript application/x-javascript
</IfModule>
Apache错误在这里:
J:/wamp/www/site/.htaccess:无效的命令“ AddOutputFilterByType”,可能是拼写错误或由服务器配置中未包含的模块定义的,引用者:/ site / about /
如果您使用的是Apache 2.4,则需要进行更改
<IfModule mod_deflate.c>
至
<IfModule mod_filter.c>
因为输出过滤器已移至mod_filter。 然后,您需要确保已加载mod_filter。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.