Three host (Linux, Windows, VPS) 301 Redirect Jump implementation method

Source: Internet
Author: User

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

301 redirect is mainly to the domain name a jump to domain B, more often than not with the domain name of the WWW jump to the domain name with www, then 301 redirect should do it, this article detailed introduction of the 301 redirect practice, the following is divided into Linux host, Windows host and VPS host three kinds of circumstances tell (all to the site domain name yedward.net jump to www.yedward.net this as an example):

(i) Linux host

For Linux virtual host Apache servers, support is required. htaccess this file. First determine if the host is supported. htaccess this file (can ask the host), if supported, first two domain names are resolved to this server, and then add the following rule in. htaccess:

Rewritecond%{http_host} ^yedward.net [NC]

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

If your site is already in the root directory. htaccess file, then you can modify the file directly, and then add this rule, if you do not exist in the root directory of the site. htaccess file, you can first create a htaccess.txt such an empty file, and then add the following rules, after the completion of the HTA Upload the Ccess.txt file to the site root, and then modify the Htaccess.txt name to. htaccess, the rule is:

Rewriteengine on

Rewritecond%{http_host} ^yedward.net [NC]

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

(ii) Windows mainframe

Windows host IIS server, first need to install isap_rewrite this component, the same to ask the host whether support this component, if supported, will two domain names are resolved to the IP, Then for the Windows host we need to build the Httpd.ini file instead of the. htaccess file, this place needs to be noted, and then add the following rule to the Httpd.ini file:

Rewritecond Host: ^yedward\.net$

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

Rewritecond Host: ^seo\.yedward\.net$

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

The above rule is to yedward.net this domain name 301 jumps to www.yedward.net this domain name, simultaneously also will seo.yedward.net this domain name jumps to www.yedward.net this domain name. If you have httpd.ini files in the root directory of your Web site, you can directly add the above rules, if the site root directory does not exist in the file, you can create a new httpd.txt empty file, and then add the following rules, save files with FTP uploaded to the site root directory, the Httpd.txt name modified to httpd . ini, the rules are as follows:

[Isapi_rewrite]

# 3600 = 1 hour

Cacheclockrate 3600

Repeatlimit 32

Rewritecond Host: ^yedward\.net$

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

Rewritecond Host: ^seo\.yedward\.net$

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

(iii) VPS host

For the VPS host, you can directly control the management backstage, I enclose a picture to show you the following:

  

Step one: Go to "Control Panel" and then find "admin tools" in it, and then see the interface shown above, because I'm a Windows XP system, just for demonstration purposes, the real Windows host will not use Windows XP system, So it may look a little different on the interface, but it doesn't affect the operation.

  

Step two, open Internet Information Services, then enter the "website", will see the results shown above, if your site is in a running state, you will be in the "default site" after the word "run", and I am here "stop", but this does not affect.

  

In the third step, right click on the "Default Web site (stop)" You see in the second step, then select "Properties" in the dialog box that appears, and then go to the interface shown in the image above, and select Home directory.

  

The fourth step, select "Redirect to URL" in the home directory, enter the destination address to jump to in the input box, and check the "Permanent redirect of resources" below, then confirm it, and then complete the 301 redirect of the VPS host.

(four) My host does not support the above 301 jump how to do?

For the host that does not support the above 301 jumps, then do not do 301, also have no relation, you can achieve the same effect through other methods, such as do website normalization, website use absolute address, etc., this can let the search engine know which is your target URL clearly.

The above is a more detailed introduction of the 301-directional production method, if you are still a bit not clear, you can contact me, this site address http://www.yedward.net, welcome your visit, I hope this article can help 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.