Applies To: Windows 7, Windows Server 2008, Windows Server 2008 R2, Windows Vista
Configure the redirection destination to be an exact
destination when you want to change the default redirection behavior.
When you configure the destination to be an exact destination, all
incoming requests are redirected to the exact destination instead of the
relative destination. This is useful when you want all requests to be
redirected to the same Web page, such as when a site is down for
maintenance or when it is undergoing construction.
Note |
---|
You must first enable redirection and configure the redirection destination. For more information about how to enable redirection and configure the destination, see Configure the Web Server to Redirect Requests to a Relative Destination (IIS 7). |
For information about the levels at which you can perform
this procedure, and the modules, handlers, and permissions that are
required to perform this procedure, see HTTP Redirection Feature Requirements (IIS 7).
Exceptions to feature requirements
Exceptions to feature requirements
-
None
You can perform this procedure by using the user interface
(UI), by running Appcmd.exe commands in a command-line window, by
editing the configuration files directly, or by writing WMI scripts.
-
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).
-
In Features View, double-click HTTP Redirect.
-
On the HTTP Redirect page, under Redirect Behavior, select Redirect all requests to exact destination (instead of relative to destination).
-
In the Actions pane, click Apply.
To configure the redirection destination to be an exact destination, use the following syntax:
appcmd set config /section:httpRedirect /exactDestination:true | false
By default, this attribute is false, but you can specify true for the exactDestination attribute. To do this, type the following at the command prompt, and then press ENTER:
appcmd set config /section:httpRedirect /exactDestination:true
For more information about Appcmd.exe, see Appcmd.exe (IIS 7).
appcmd set config /section:httpRedirect /exactDestination:true | false
By default, this attribute is false, but you can specify true for the exactDestination attribute. To do this, type the following at the command prompt, and then press ENTER:
appcmd set config /section:httpRedirect /exactDestination:true
For more information about Appcmd.exe, see Appcmd.exe (IIS 7).
The procedure in this topic affects the following configuration elements:
attribute of the element
Use the following WMI classes, methods, or properties to perform this procedure:
-
HttpRedirectSection.ExactDestination property
No comments:
Post a Comment