<Directory /data/www/data>
php_admin_flag engine off
<filesmatch "(.*)php">
Order deny,allow
Deny from all
</filesmatch>
</Directory>
禁止指定user_agent
<IfModule mod_rewrite.c>
RewriteEngine on RewriteCond %{HTTP_USER_AGENT} ^*Firefox/4.0* [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^*Tomato Bot/1.0* [NC]
RewriteRule .* - [F]
</IfModule>
Apache通过rewrite限制某个目录
<IfModule mod_rewrite.c>
RewriteEngine on RewriteCond %{REQUEST_URI} ^.*/tmp/* [NC]
RewriteRule .* - [F]
</IfModule>
本文出自 “10897714” 博客,请务必保留此出处http://10907714.blog.51cto.com/10897714/1730682
Apache禁止解析php 禁止指定user_agent Apache通过rewrite限制某个目录
原文:http://10907714.blog.51cto.com/10897714/1730682