We are excited to announce that the IIS.NET Forums are moving to the new Microsoft Q&A experience. Learn more >

Redirect/Rewrite inside a Web applicationRSS

1 reply

Last post May 28, 2019 02:59 AM by Able

  • Redirect/Rewrite inside a Web application

    May 27, 2019 12:14 PM|eladfern|LINK


    I have a web site: that has a rewrite rule which take any redirect from :

     www.contoso.com to www.contoso.com/local/client

    now i have a web application under this site:


    i want that any request to www.contoso.com/app will redirect to www.contoso.com/local/client



  • Re: Redirect/Rewrite inside a Web application

    May 28, 2019 02:59 AM|Able|LINK

    Hi eladferm,

    According to your description, I have made a samle here. I suggest that you could use IIS url rewirte  module in iis.You could add below rule in your web.config file of your web application.

                    <rule name="rule1" stopProcessing="true">
                        <match url="^app$" />
                        <conditions logicalGrouping="MatchAny">
                            <add input="{HTTP_HOST}" pattern="www.contoso.com" />
                        <action type="Redirect" url="local/client" />

    Here is the link for url rewrite ,I hope it could help you.


    Best Regards


    Please remember to click "Mark as Answer" the responses that resolved your issue.
    If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.