Actual combat VPS under IIS 301 redirect

Source: Internet
Author: User
Keywords iis 301 redirect

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

In the daily website construction and optimization, often encounter the site adjustment and change the address, and changes to the directory caused by the URL transformation, and so on, in order to keep the original page has the weight, we need to the page for a permanent redirect to the search engine for a friendly signal. Do 301 redirected pages, you can retain the most significant weight, reduce the impact of Web site changes.

  

Many beginners don't quite know how to redirect. Today, I tell you about the next, server or VPS, in the IIS environment how to do redirect.

The first case: redirects without www to the www.

In the case of the site, we bind the host header to this URL, the domain name resolution to the server IP, this time can be accessed. Some friends directly on this website bound without WWW domain name, I do not recommend this, this will give us 301 redirect to bring a problem, it is likely to make your redirect into a dead loop, unable to open the page.

First of all, we create a new Web site, binding the main head is not with the WWW domain name, and then the site directory as long as a random write a 301.html file or xxxx.html file, etc., the contents of the file can be empty. In this way, the site is built, then we right---attributes---the home directory, select the third, redirect to the URL, below fill in your with the WWW domain name. The permanent redirection of resources to check, confirm, this completes without the WWW domain name redirect to the domain name with www. And there is no death cycle. For convenience, the cash net author specially screenshot as follows:

  

In the second case, redirect the www.a.com to the www.b.com

This situation is relatively simple, just above the www.a.com right key attributes---The home directory, redirect to the URL, the following fill in the www.b.com, and then the resource permanent redirect to check. Note that if you need to redirect the parameters of the domain name to the new domain name and correspond to it, you need to add $s$q to the redirected domain and tick the exact URL you entered above. As shown in

  

By the way: $S pass the suffix of the requested URL to the new URL, and $q passes the parameters in the initial URL, such as the QueryString parameter, to the new URL, including the question mark (?).

In the third case, redirect www.a.com/index.html to www.a.com.

The domain name is appended with a suffix, this situation many people have encountered, especially the use of DZ friends, often in the domain name after the automatic forum.php and other suffix name, although the search engine on this did not make it clear that the weight will be dispersed, but still someone experimented with the nuances between the two, from another aspect , removed the suffix, also makes the domain name look more refreshing.

In fact, redirection is as simple as these two.

As soon as we click on IIS on the site we want to do redirect, on the right side, select the file to be redirected, such as index.html, then right-click-Attributes----file to select Redirect, fill in the specific URL below, and then the permanent redirection check can be selected. As shown in

  

Well, under IIS, a general number of redirects are finished, the author here is only to play a role in the hope that some of the problems in the confusion of the novice can be inspired.

Thank you for your support, this article by the cash network published in http://www.hg917.com/news/quanxunwang/0Q53502012.html, reproduced please indicate the source, thank you for your cooperation.

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.