.htaccess 文件
RewriteEngine On
ErrorDocument 404 /404.htm
#301重定向
Options +FollowSymLinks
RewriteCond %{HTTP_HOST} ^tzgov.org [NC]
RewriteRule ^(.*)$ http://www.0576tz.cn/$1 [L,R=301]
RewriteCond %{HTTP_HOST} ^0576tz.cn [NC]
RewriteRule ^(.*)$ http://www.0576tz.cn/$1 [L,R=301]
RewriteCond %{HTTP_HOST} ^www.tzgov.org [NC]
RewriteRule ^(.*)$ http://www.0576tz.cn/$1 [L,R=301]
#设置php权限
RewriteCond % !^$
RewriteRule uploads/(.*).(php)$ – [F]
RewriteRule data/(.*).(php)$ – [F]
RewriteRule templets/(.*).(php)$ – [F]
#防盗链
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www.)?0576tz.cn/.*$ [NC]
RewriteRule .(gif|jpg|swf|flv|png)$ / [R=302,L]
#dedetags伪静态
RewriteRule ^tags/(.*)/$ /tags.php?/$1