Chinaunix

标题: 关于http.conf的AccessFileName问题 [打印本页]

作者: frlssimi    时间: 2006-10-19 04:06
标题: 关于http.conf的AccessFileName问题
在已经配置好的httpd.conf看见这样一段:

<IfModule mod_userdir.c>
    UserDir public_html
</IfModule>

AccessFileName .htaccess
#
# The following lines prevent .htaccess files from being viewed by
# Web clients.  Since .htaccess files often contain authorization
# information, access is disallowed for security reasons.  Comment
# these lines out if you want Web visitors to see the contents of
# .htaccess files.  If you change the AccessFileName directive above,
# be sure to make the corresponding changes here.
#  1.上面是.htacess,下面是.ht,这不是明显名字不统一么?
#  2.下面的那一语句块是否只起了限定访问的作用,实际的.htacess文件还要在具体文件夹中定义呢???/
#  3.如果在有需要情况下创建多个.htaccess文件, 那么名字必须都是通一成AccessFileName指定的名字了吧, 那么到底是.htacess,还是.ht???
#
# Also, folks tend to use names such as .htpasswd for password
# files, so this will protect those as well.
#
                                                                                                                                               
<Files ~ "^\.ht">
    Order allow,deny
    Deny from all
    Satisfy All
</Files>


不懂的地方写在了注释中, 哪位能帮忙解答一下,不胜感激!
作者: langue    时间: 2006-10-19 05:21
拜托,那个是正则,不是简简单单的 .ht。

~ "^\.ht" 表示匹配所有以 .ht 开头的文件,包括 .htaccess,.htpasswd,……
作者: frlssimi    时间: 2006-10-19 06:36
标题: 回复 2楼 langue 的帖子
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,,,,,,我晕!!!!!!!!!!!!!!!!!!!!!!!!!!!!

我太菜,

我选择,我喜欢...............................................




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2