locked
basic functionality question RRS feed

  • Question

  • User-1292668666 posted

    I've been messing with the URLRewrite module for some time today....

    Does the URL Rewrite support the following situation?

    My website is like this: https://www.examplesite.com/Website/login.aspx

    I want to change it, without having to change the directory name and everything in IIS to:

    https://www.examplesite.com/SomethingElse/login.aspx

    So that when I visit the "SomethingElse" url it will actually show the website named "Website" in IIS?

    If so, how would I accomplish this? 

    Monday, March 6, 2017 9:27 PM

All replies

  • User-460007017 posted

    Hishaozor,

    You could use following rule to achieve your requirement if you didn't enable the form authentication:

        <rule name="REWRITE somethingelse">
                        <match url="(.*)" />
                        <conditions>
                            <add input="{URL}" pattern="^/SomethingElse/(.*)$" />
                        </conditions>
                        <action type="Rewrite" url="Website/{C:1}" />
                    </rule>

    If the form authentication is enabled with the URL /website/login.aspx, then all the request will automatically redirected.

    The other way to achieve this is create another virtual directory and map it to Website if it is a abosolute folder.

    Best Regards,

    Yuk Ding

    Tuesday, March 7, 2017 8:25 AM