asp.net php asp jsp 301重定向的代码
2010-11-20 08:03:09 来源:WEB开发网核心提示:RewriteEngine OnRewriteCond %{HTTP_HOST} !olddomain.com$ [NC]RewriteRule ^(.*)$ http://www.newdomain.com/$1 [L,R=301]4.重定向olddomain.com to newdomain.comRewriteE
RewriteEngine On
RewriteCond %{HTTP_HOST} !olddomain.com$ [NC]
RewriteRule ^(.*)$ http://www.newdomain.com/$1 [L,R=301]
4.重定向olddomain.com to newdomain.com
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} !olddomain.com$ [NC]
RewriteRule ^(.*)$ http://newdomain.com/$1 [L,R=301]
5.重定向domain.com/file/file.php 到 otherdomain.com/otherfile/other.php
RewriteCond %{HTTP_HOST} ^www.domain.com$
RewriteRule ^file/file.php$ php">http://www.otherdomain.com/otherfile/other.php [R=301,L]
更多精彩
赞助商链接