作者magicallove (小判)
看板FreeBSD
标题Re: [问题] 利用 .htaccess 限制index
时间Sun Nov 15 16:55:40 2009
http://www.twbsd.org/cht/book/index.php?ch=14
修改 server 设定档 httpd.conf
<Directory "/home/www">
Options
Indexes FollowSymLinks MultiViews ExecCGI
AllowOverride AuthConfig
Order allow,deny
Allow from all
</Directory>
拿掉 Indexes 就可以达到你的需求了
也可以多写几个 Directory 设定多个目录
※ 引述《paulyanzi (消失)》之铭言:
: 上网找了一些介绍 .htaccess 的文章
: 大多数都是讲 密码保护,自设错误报告文件,自设首页档案 ,重新导向文件...etc
: ex:http://forum.slime.com.tw/thread151945.html
: 底下想做的想法但是看了之後还是没有成功
: 想把我自己的家目录设定成无法list 而除了家目录其他目录都可以list
: /home/userA/public_html/ --> 无法显示Indexes
: http://xxx/userA
: /home/userA/pulbic_html/others/ -->可以Indexes
: http://xxx/userA/others
: /home/userA/pulbic_html/others2/ -->可以Indexes
: http://xxx/userA/others2
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 140.116.250.14