如何忽略.htaccess?
有没有办法告诉 Apache 忽略当前目录下的其他 .htaccess 文件? 例如:
/web/.htaccess [this is parsed, I would like to define the rule here]
/web/uploads/.htaccess [this should be ignored]
Is there a way to tell Apache to ignore other .htaccess files under current directory?
For example:
/web/.htaccess [this is parsed, I would like to define the rule here]
/web/uploads/.htaccess [this should be ignored]
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在您的主 apache 配置中,添加指令
AllowOverride None
。这将阻止它查看 .htaccess 文件。
有关详细信息,请参阅 http://httpd.apache.org/docs/2.0/mod/core .html#allowoverride
In your main apache config, add the directive
AllowOverride None
.This will prevent it from looking at .htaccess files.
For more info, see http://httpd.apache.org/docs/2.0/mod/core.html#allowoverride