mod_headers不起作用 [英] mod_headers not working
本文介绍了mod_headers不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在http.config中启用mod_headers
和mod_rewrite
,从行中删除#.
I enable mod_headers
and mod_rewrite
in my http.config removing the # from line.
LoadModule headers_module modules/mod_headers.so
LoadModule rewrite_module modules/mod_rewrite.so
我需要启用更多功能,否则.htaccess出现错误?
I need enable more something or the error is on .htaccess?
.htaccess.
.htaccess.
RewriteEngine On
RewriteRule ^(.*?)\.x$ /$1.php [L]
<IfModule mod_headers.c>
<filesMatch "\.(x)$">
Header set foo "baa"
</filesMatch>
</IfModule>
提前谢谢!
推荐答案
尝试通过以下方式加载标头模块
Try loading the headers module with
sudo a2enmod headers
sudo service apache2 restart
这篇关于mod_headers不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文