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

 

REMEMBER: these articles are REPUBLISHED. Your best bet to get a reply is to follow the link at the top of the post to the ORIGINAL post! BUT you're more than welcome to start discussions here:

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