Remove folder/application names from URLs

This post has been republished via RSS; it originally appeared at: IIS Support Blog articles.

If your website’s address is this:

 

http://testsite.com/testapp/default.htm 

 

and you want your users to see the URL below in browser address bar (The name “testapp” is stripped out)

 

http://testsite.com/default.htm 

 

you can use the URL Rewrite Inbound rule below for removing the folder name from the FQDN:

 

<rewrite> <rules> <rule name="Remove testapp" stopProcessing="true"> <match url=".*(testapp)(.+)" /> <action type="Redirect" url=http://testsite.com{R:2} appendQueryString="false" /> </rule> </rules> </rewrite>

 

Nedim_0-1621973878176.png

 

Nedim_1-1621973878179.png

 

Leave a Reply

Your email address will not be published. Required fields are marked *

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.