简体   繁体   中英

Restricting access to a web directory using .htaccess

I want to restrict access to certain web directories in my website using .htaccess file. I know one way using order allow,deny deny from all But it restricts only the first directory. It doesn't work for the remaining ones. Please help

You are wrong, using deny from all also applies to subdirectories.

ie unless there is another .htaccess inside the other sub directories that allows the access

Options -Indexes将此行添加到.htaccess文件的顶部

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM