Thursday, November 19, 2015

Permanently redirect web traffic on IIS.

Problem


Handed a task to redirect user's from an old site to the new site.  Getting reports of site outage due to fact user's are trying to access server we have decommissioned.  They need to be using new server url but are using old bookmarks.  IIS has a couple of ways to do it but easiest is to use built in support.

  1. Open IIS Manager and navigate to the level you want to manage. For information about opening IIS Manager, see Open IIS Manager (IIS 7). For information about navigating to locations in the UI based on your IIS administrative role, see Navigation in IIS Manager (IIS 7).
  2. In Features View, double-click HTTP Redirect.


  3. On the HTTP Redirect page, under Redirect Behavior, select one of the following values from the Status code list:


    • Found (302) - to tell the Web client to issue a new request to the location specified in the Location HTTP header.
    • Permanent (301) - to tell the Web client that the location for the requested resource has permanently changed.
    • Temporary (307) - to tell the Web client to resend the POST data, which prevents a Web browser from losing data when the browser issues an HTTP POST request.
  4.  Click OK.


Source

https://technet.microsoft.com/en-us/library/cc770393%28v=ws.10%29.aspx

No comments:

Post a Comment