码迷,mamicode.com
首页 > 其他好文 > 详细

AllowOverride None

时间:2016-09-06 01:07:48      阅读:116      评论:0      收藏:0      [点我收藏+]

标签:

PHP Advanced and Object-Oriented Programming
Larry Ullman
 1 <Directory />
 2 AllowOverride None
 3 </Directory>
 4 #Depending on the installation and configuration, Apache, on thestrictest level of security, will not allow .htaccess files to change Apache behavior.
 5 #The root directory (/) is the target, meaning that Apache will not allowover-rides—changes—made within any directories on the computer at all.
 6 
 7 #Another common use of an .htaccess file is to protect the contents of a directory.
 8 # Thereare two possible scenarios:
 9 #• Denying all access
10 #• Restricting access to authorized user
11  
12 #To deny all access to a directory’s contents
13 # Disable directory browsing:
14 Options All -Indexes
15 # Prevent folder listing:
16 IndexIgnore *
17 # Prevent access to any file:
18 <FileMatch "^.*$">
19     Order Allow, Deny
20     Deny from all
21 </FileMatch>
22 
23 #Again, this code just prevents direct access to that directory’s contents via a Webbrowser. 
24 #A PHP script could still use include(), require(), readfile(), and other functions to access that content.

 

AllowOverride None

标签:

原文地址:http://www.cnblogs.com/yuanjiangw/p/5844216.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!