Welcome to WuJiGu Developer Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
446 views
in Technique[技术] by (71.8m points)

apache - deny directory listing with htaccess

I have a folder, for example : /public_html/Davood/ and too many sub folder in folder, for example : /public_html/Davood/Test1/ , /public_html/Davood/Test1/Test/ , /public_html/Davood/Test2/ , ...

I want add a htaccess file into /public_html/Davood/ To deny DirectoryListing In /Davood And Sub Folders, It's Possible ?

Question&Answers:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Options -Indexes should work to prevent directory listings.

If you are using a .htaccess file make sure you have at least the "allowoverride options" setting in your main apache config file.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to WuJiGu Developer Q&A Community for programmer and developer-Open, Learning and Share
...