Share via


HTTP Redirect

 

Applies To: Windows Server 2012 R2, Windows Server 2012

Use the HTTP Redirect feature page to enable redirection and to configure how incoming requests are redirected to a new destination.

Related scenarios

UI Elements for HTTP Redirect

The following tables describe the UI elements that are available on the feature page and in the Actions pane.

Feature Page Elements

Element Name

Description

Redirect requests to this destination

Select this option to enable redirection and to specify the URL to which to redirect requests. Requests can be redirected to a virtual path, such as https://www.contoso.com/sales, or to a file, such as https://www.contoso.com/sales/default.aspx.

Redirect all requests to exact destination (instead of relative to destination)

Select this option when you want to redirect clients to the exact URL as specified in the Redirect requests to this destination box.

When this option is not selected, the destination is relative to the value specified in Redirect requests to this destination. For example, if you configure the redirection destination to be https://www.contoso.com/sales, and an incoming request is https://www.contoso.com/marketing/default.aspx, IIS will redirect the request to https://www.contoso.com/sales/default.aspx.

Only redirect requests to content in this directory (not subdirectories)

Select this option when you want to redirect clients to content in only the directory that is specified in the Redirect requests to this destination box.

When this option is not selected, requests are redirected to the location in the Redirect requests to this destination box, and to any subdirectories under that location. For example, if you configure the redirection destination to be https://www.contoso.com/sales, requests can be served from directories under /sales when the Redirect all requests to exact destination (instead of relative to destination) option is not also selected.

Status code

Select one of the following options to specify the redirect status code that is sent to clients:

  • Found (302): Tells the web client to issue a new request to the location. This option is the default.

  • Permanent (301): Tells the web client that the location for the requested resource has permanently changed.

  • Temporary (307): Prevents a web browser from losing data when the browser issues an HTTP POST request.

Actions Pane Elements

Element Name

Description

Apply

Saves the changes that you have made on the feature page.

Cancel

Cancels the changes that you have made on the feature page.