view more software Tips and Tricks
Updated: 02/02/2012 13:02 PM
Author: Shiju Mathews
In situation where we need page or the whole site to be redirected to another page on the same site or to a diffrent web site, web.cofig file can be a solution.The
IIS 7.5 The
IIS 7.0 The
IIS 6.0 The
Web.config Add a child element httpRedirect to the
httpResponseStatus value can be
Found: Returns a 302 status code, which tells the client to issue a new request to the location specified in the destination attribute.
Permanent: Returns a 301 status code, which informs the client that the location for the requested resource has permanently changed.
Temporary:Returns a 307 status code, which prevents the client from losing data when the browser issues an HTTP POST request.
Default value is 'Found'
1. Redirect current site to a new website.
The following configuration sample adds a wildcard redirection entry that redirects all requests for ASP files to the home page of your Web site.
childOnly, destination, enabled, exactDestination,httpResponseStatus