php_admin_flag engine off 

 

Order deny,allow 

Deny from all 

 



禁止指定user_agent

 

RewriteEngine on RewriteCond %{HTTP_USER_AGENT} ^*Firefox/4.0* [NC,OR] 

RewriteCond %{HTTP_USER_AGENT} ^*Tomato Bot/1.0* [NC] 

RewriteRule .* - [F] 


Apache通过rewrite限制某个目录

 

RewriteEngine on RewriteCond %{REQUEST_URI} ^.*/tmp/* [NC]

RewriteRule .* - [F]