无法隐藏htaccess文件

编程入门 行业动态 更新时间:2024-10-25 18:28:39
本文介绍了无法隐藏htaccess文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我很难隐藏我的.htaccess文件-我仔细检查以确保httpd.conf中存在以下内容:

I'm having a difficult time hiding my .htaccess file -- I double-checked to ensure the following was present in httpd.conf:

<Files ~ "^\.ht"> Order allow,deny Deny from all </Files>

目录上的其他allow/deny指令正在运行,可见的.htaccess文件中的指令正在运行.

Other allow/deny directives on directories are working and the directives in the visible .htaccess file are working.

我们正在运行Red Hat Enterprise Linux Server 6.3(圣地亚哥)和Apache/2.2.15.

We are running Red Hat Enterprise Linux Server release 6.3 (Santiago) and Apache/2.2.15.

我的问题:除了显而易见的原因:为什么.htaccess文件仍然可见?"是否有其他一些指令可以覆盖该指令,或者我可能缺少模块? (我认为如果是这种情况,apache会抛出一个错误.)

My question: Aside from the obvious of, "Why is the .htaccess file still visible?" Is there some other directive that would override this directive or might I have a module missing? (I would think apache would throw an error if this were the case.)

对该文件进行任何更改后,我重新启动了apache,甚至还进行了完整性检查以重新启动.我还对该文件进行了其他一些更改,以确保我使用的是正确的配置文件.

I restarted apache after any changes to this file and even rebooted as a sanity check. I also made some other changes to this file to ensure that I was working on the correct configuration file.

推荐答案

您是否看过 How <Directory>, <Location> and <Files> sections work ?似乎稍后可能还会评估另一个指令(可能是Location),该指令将覆盖您的Files指令.如果没有您的Apache配置的更多详细信息,很难诊断出更多信息.

Have you taken a look at How <Directory>, <Location> and <Files> sections work? It seems that there might be another directive (probably Location) evaluated later, which overrides your Files directive. It's hard to diagnose more without further details of your Apache configuration.

更多推荐

无法隐藏htaccess文件

本文发布于:2023-10-31 18:36:08,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1546932.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:文件   htaccess

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!