Win2008 R2 iis7/iis7.5 System http redirection (301 redirect) graphics and text method _win Server

Source: Internet
Author: User
Tags http redirect

First of all, learn about redirects, commonly used redirect methods are: Redirect, 302 redirect and Meta Fresh.
when do I need to do 301 redirects?
If you want to change the domain name, you can do 301 Redirect to achieve the search engine on your Web site is still effective and PR and other data unchanged and other search engine friendly effect, to ensure flow stability.
If you have more than one home page URL, that is, visitors can reach the same page through different URLs, this situation is the PR dispersed and the spread of the chain of the situation, you can do 301 redirect to determine the unique home page URL, the unified URL of all the PR and chain focus.
If you need to delete some pages inside the site, you can use the 301 Redirect to redirect the Web site to the home page.
If you have multiple different domain names or different Web sites that need to point to the same site, you can achieve it through 301 permanent redirects.
If you want to merge two sites, you want to make sure that links to expired URLs are redirected to the correct page.

HTTP redirection

HTTP redirection supports redirecting user requests to a specific target. Use HTTP redirection when you want a client that might be using a URL to actually stop at another URL. This feature is useful in many cases, from renaming your Web site to overcoming difficult to spell domain names or forcing clients to use the HTTPS protocol.

By default, the "HTTP redirection" feature of IIS is not installed and we need to manually put this role on the installation.
On the desktop, right-click Computer, select Manage, and then expand role Select Web Server (IIS) and then on the left you can drag down to
Role service Here you can see if HTTP redirection is installed if it is not installed you can install it in the Add role service (no installation disk is required)

Setting up and installing

After selecting, click Install, you can use it without restarting your computer and IIS.

The following are the specific setup methods:

IIS7, create a new site, the URL to turn to the binding, if the group by region, in IIS you will see the "HTTP Redirect" icon, click to enter the Setup interface, fill in the URL you want to go to:

Fill in as required, you know!

Double-click into

If necessary for example: jb51.net implementation of www.jb51.net adjustment requires the following configuration

Select Redirect request to this target example: http://www.jb51.net, because what I did here is 301 redirect Status code, select Permanent (301) as shown in the following illustration:

Then click "Apply", you can.

In fact, many of iis7.5 's settings are stored in the web.config.

<?xml version= "1.0" encoding= "UTF-8"?>
<configuration>
  <system.webServer>
    < HttpRedirect enabled= "true" destination= "http://www.jb51.net" httpresponsestatus= "permanent"/> </
  System.webserver>
</configuration>

If there is a situation you can check to redirect all requests to the exact directory (instead of relative to the directory)

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.