Reputation: 73
I would like to get my URL redirect from a legacy URL with .aspx to one without it using IIS.
Example:
Can we achieve the redirect of the above type using IIS? Please help me with this.
Thanks in advance.
Upvotes: 1
Views: 206
Reputation: 781
You can do this in IIS with URL Rewrite module. You can configure it in IIS manager. Some examples are in the documentation. This redirecting rule should work.
<rewrite>
<rules>
<rule name="Redirect from aspx" stopProcessing="true">
<match url="^(.+?).aspx" />
<action type="Redirect" url="{R:1}" appendQueryString="true" />
</rule>
</rules>
</rewrite>
Upvotes: 1