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