复制代码 代码如下:
#加载mod_rewrite
LoadModule rewrite_module modules/mod_rewrite.so
#打开mod_rewrite
RewriteEngine On
#开启Log(用于调试)
RewriteLog "logs/rewrite.log"
RewriteLogLevel 9
#只将siteX,demo,support开头的域名做Rewrite
RewriteCond %{SERVER_NAME} ^(site|demo|support) [NC]
#在URI前面加上主机名
RewriteRule ^(.+) %{SERVER_NAME}$1 [C]
#将这台服务器的所有xxx.TA.com/*转到xxx.TB.com/*
RewriteRule ^([a-z0-9]+)/.([0-9a-z/.]+)/(.*) $1/.TB/.com/$3 [NC,R,L]
新闻热点
疑难解答