Windows IIS 7.5 Configuration 301 Redirection (URL rewrite)

Source: Internet
Author: User
Tags regular expression

Requirement background:

If you need to change the Web site by the style shown in SEO search engine results, it is recommended that you use server-side 301 redirection. This is the best way to ensure that users and search engines are directed to the correct Web page. The 301 status code indicates that a Web page has been permanently migrated to a new location.

The 301 redirection feature is especially useful in the following situations:
1. You have moved your site to a new domain, and you want to complete this transformation as smoothly as possible.
2, people visit your website through different websites. For example, if you can access your home page in a variety of ways, such as Http://example.com/home, http://home.example.com, or http:// www.example.com, then, it's a good idea to select one of the preferred (standard) target URLs and send traffic from other URLs to the preferred URL through 301 redirects.
3. You are merging two websites, and you want to make sure that links to expired URLs are redirected to the correct pages.

Configuration Example:

1, the first level of domain name after the specific path of traffic redirect to level two domain name: http://domain name. me/archives/1114-> http://blog. Domain name me/archives/1114

Click on the first level of the domain name "url rewrite" function module, add blank rules, patterns fill in the corresponding regular expression, completed, you can click the "Test mode" to determine the correctness of the expression, regular expressions in the brackets can be dynamically intercepted.

2, the first-level domain name Directory Access redirect to level two domain name: Http://www.111cn.net/api-> http://www.111cn.net

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.