首页 > 代码库 > AllowOverride None
AllowOverride None
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 access10 #• Restricting access to authorized user11 12 #To deny all access to a directory’s contents13 # Disable directory browsing:14 Options All -Indexes15 # Prevent folder listing:16 IndexIgnore *17 # Prevent access to any file:18 <FileMatch "^.*$">19 Order Allow, Deny20 Deny from all21 </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
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。