1.虚拟主机支持控制面板实现301重定向
登录虚拟主机控制面板,然后找到设置301重定向的页面,按照提示添加源域名和目标域名后稍等一段时间,301重定向就会生效了。
2.IIS 服务器实现301 重定向
RewriteEngine onRewriteRule ^(.*)$ http://www.metinfo.cn/$1 [R=301,L]
ASP:Response.Status="301 Moved Permanently"Response.AddHeader "Location","http://lusongsong.com/"Response.End
PHP:header("HTTP/1.1 301 Moved Permanently");header("Location:http://lusongsong.com/");exit();
[ISAPI_Rewrite]# 3600 = 1 hourCacheClockRate 3600RepeatLimit 32RewriteCond Host: ^metinfo\.cn$RewriteRule (.*) http\://www\.metinfo\.cn$1 [I,RP]
RewriteCond Host: ^metinfo\.cn$RewriteRule (.*) http\://www\.metinfo\.cn$1 [I,RP]