Intermediary transaction http://www.aliyun.com/zixun/aggregation/6858.html ">seo diagnose Taobao guest cloud host technology Hall
Because 302 redirect is a temporary redirect, it is easy to hijack the site, and hijack the other party's PR value, etc., so the search engine generally do not like this type of redirection, so in doing redirect when it is best to get 301 redirect. Strictly speaking with 301 redirect is to avoid SEO cheating, not really SEO optimization.
Let's look at how to implement 301 redirects:
If your server is Windows and is a stand-alone host, then you can set this up:
Open Internet Information Services Manager, and then under virtual directory, select Redirect to URL (u), and then enter the destination URL you want to redirect, and then select permanent redirection of resources to determine.
If your server is Apache, you can use the. htaccess file to achieve redirection:
Just add a similar
Rewriteengine on
Rewritecond%{http_host} ^beijing-seo.com.cn [NC]
Rewriterule ^ (. *) $ http://beijing-seo.com.cn/$1 [l,r=301].
In addition, you can use ASP, PHP,. NET code to achieve 301 redirects:
ASP:
Response.status= "Moved Permanently"
Response.AddHeader "Location", "http://beijing-seo.com.cn/"
Response.End
PHP:
Header ("http/1.1 moved Permanently");
Header ("location:http://beijing-seo.com.cn/");
Exit ();
. NET:
<script runat= "Server" >
private void Page_Load (object sender, System.EventArgs e)
{
Response.Status = "Moved Permanently";
Response.AddHeader ("Location", "http://beijing-seo.com.cn/");
}
</script>
Webmaster Network News list Www.admin5.com/top