Set up a total station 301 Redirect to enhance the weight of your site

Source: Internet
Author: User

Intermediary transaction http://www.aliyun.com/zixun/aggregation/6858.html ">seo diagnose Taobao guest cloud host technology Hall

Increasing the weight of the site is a permanent topic. Here I would like to say a detailed question, is how to your virtual host, VPS Server set up a real total station 301 Redirect, the xxxx.com all page 301 Resources redirected to www. xxxx.com corresponding to the page, so that the full weight of the total station to focus on the WWW opening domain name under the purpose to enhance the weight of the site.

In the first case, if you have a server or VPS, and the system is Windows system.

Under IIS, it is easy to set up to implement total station redirection.

The specific method is: In the VPS in the www.xxxx.com domain name of the site, in the same way to build a xxxx.com site. Then open IIS. Right-click on the xxxx.com Web site to open Select Properties, select the Home Directory tab, and then follow this diagram to set

  

In the second case, if your system is Linux.

Do the whole station 301 jump, very simple. Modify the file httpd.conf or. htaccess files as follows:

Rewriteengine on

Rewritecond%{http_host} ^xxxx.com [NC]

Rewriterule ^ (. *) $ http://www.xxxx.com/$1 [l,r=301]

Third, if you are a virtual host user, if you have subdirectories, congratulations, you can also complete the station 301 redirect. The specific methods are:

1. New 404.asp, put the following code in the new 404 files Saved.

Code

<%@ Language=vbscript%>
<%
Dim Pageurl
Pageurl= "http://" &request.servervariables ("Http_host") &request. ServerVariables ("URL") & "?" &request.servervariables ("Query_string")
Pageurl = Replace (Pageurl, "http://xxxx.com/404.asp?404;http://xxxx.com:80", "")//Modify your old domain name
Response.status= "Moved Permanently"
Response.AddHeader "Location", "http://www.xxxx.com" &PageURL& ""//Modify your domain name
%><%@ language= "VBscript" >

<%@ language= "VBscript" >

2. New index.asp, put the following code in the new IND file to save.

Code

<%@ Language=vbscript%>
<%
Response.status= "Moved Permanently"
Response.AddHeader "Location", "http://www.xxxx.com/"//modified for your domain name.
%><%

Response.status= "Moved Permanently"

Response.AddHeader "Location", "http://www.xxxx.com/"//modified for your domain name.

%>

3. Use FTP in the site root directory to create a new folder named 301, the above index.asp and 404.asp upload. Then open the Virtual Host Control Panel, add subdirectories, the domain name xxxx.com binding to 301 folders, binding after the setting of the 404 page for 404.asp:

  

Fourth, if you are a virtual host user and you do not have a subdirectory, the lack of silver Bai, hehe, can also be the whole station 301, the specific method is:

In the Web site root directory Http.ini file, add the following code:

[Isapi_rewrite]

# 3600 = 1 hour

Cacheclockrate 3600

Repeatlimit 32

Rewritecond Host: ^xxxx\.com$

Rewriterule (. *) http\://www\.xxxx\.com$1 [I,RP]

OK, the above enumerated four kinds of total station 301, of course, there are more system configuration needs different 301 settings, this needs the vast number of webmaster friends to add. The author is not a technical person, there are not the correct place million hope corrections. This article by the network Mei Wen Net (www.gowangluo.cn) stationmaster: Kungfu calf starts in A5 stationmaster station, reprint please pay attention to copyright, thank you.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.