# 域名跳转
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www.aaa.com$
RewriteRule ^/(.*)$ http://www.aa.com/$1 [R=301,L]
#
#Apache禁止指定user_agent
RewriteCond %{HTTP_USER_AGENT} ^.*http.* [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^*Tomato Bot/1.0* [NC]
RewriteRule .* -[F]
#限制目录访问
#
RewriteCond %{REQUEST_URI} ^.*/tmp/.* [NC]
RewriteRule .* -[F]
</IfModule>
本文转自 linuxpp 51CTO博客,原文链接:http://blog.51cto.com/1439337369/1706689,如需转载请自行联系原作者