Remove folder/application names from URLs

Posted by

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

 

This articles are republished, there may be more discussion at the original link. But if you found this helpful, you're more than welcome to let us know!

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