由网友(死了沒!)分享简介:如何拒绝访问 http://sub.mydomain.com/ ,但允许(完全)的 http://sub.mydomain.com/test (或的 http://sub.mydomain.com/test/ )How can I deny access to http://sub.mydomain.com/, bu...
如何拒绝访问 http://sub.mydomain.com/ ,但允许(完全)的 http://sub.mydomain.com/test (或的 http://sub.mydomain.com/test/ )
How can I deny access to http://sub.mydomain.com/, but allow for (completely) http://sub.mydomain.com/test (or http://sub.mydomain.com/test/)
有背后 http://sub.mydomain.com/test/
推荐答案
的.htaccess指令申请该目录,及其所有子目录,所以你应该禁止访问你的DocumentRoot,
.htaccess directives apply to that directory, and all subdirectories thereof, so you should disallow access in your DocumentRoot,
http://sub.mydomain.com/.htaccess :
Order deny,allow
Deny from all
和覆盖,在任何特定的子目录中,你想允许访问,
And override that in any specific subdirectories you would like to allow access to,
http://sub.mydomain.com/test/.htaccess :
Order allow,deny
Allow from all
相关推荐
最新文章