There was a problem loading the comments.

Is it possible to setup 301 Permanenet Redirection for same site through IIS

Support Portal  »  Knowledgebase  »  Viewing Article


In IIS the "301 Redirect Permanent" is not possible if being done to the same site.

There are two possible solutions for this:

Option 1. Setup URL Rewrite

The server supports URL Rewrite. URL Rewrite is somewhat like the Rewrite Module of Apache, but the recipes are quite different.
The reference can be found here:
You can also look up for URL Rewrite recipes for redirecting non-www site to www site.
An example of a URL Rewrite recipe follows:

Add the following code in the <system.webServer> section of your web.config:
<rule name="Redirect to www" patternSyntax="ECMAScript" stopProcessing="true">
<match url=".*" />
<add input="{HTTP_HOST}" pattern="^$" />
<action type="Redirect" url="{R:0}" />

Option 2.

The sites and should be two separate websites.
Then can contain "301 Redirect Permanent" to

Share via

Related Articles

Self-Hosted Help Desk Software by SupportPal
© Balasai Net Pvt Ltd