How to create an alias path on local IIS?

24,543

Solution 1

Try creating a new virtual directory under "Default Web Site" (or whatever site is serving 'localhost'), then point it to the same directory:

enter image description here

Solution 2

Though it is the too late answer. But to alias path, you can use the IIS URL Rewrite module to create a rule which maps one URL to another. Visit here for details description.

Share:
24,543
sl3dg3
Author by

sl3dg3

Updated on July 09, 2022

Comments

  • sl3dg3
    sl3dg3 almost 2 years

    Unfortunately searching the web didn't make me any smarter. I have a web application running under my local IIS 7.5: http://localhost/myWebpage/ Now I'd like to create an alias path pointing to the same application, something like http://localhost/myWebpageAlias/ (the application will change it's layout according to the different address).

    How can I achieve this?

    Thx for any tipps sl3dg3

  • sl3dg3
    sl3dg3 almost 12 years
    As a second step, you would need to Convert to Application... That's what I basically did as a workaround, I simply added a second Application, which is at the end not really an alias, since each url starts a different application.
  • Kevin P. Rice
    Kevin P. Rice over 11 years
    So you want the equivalent of multiple domain bindings, but for URL paths, right? Well, if you ran the application in the root of "Default Web Site", then you could use ASP.NET MVC style routing to capture the first path segment of the URL. If you have other apps running under the root, then I think you have the best workaround. Just specify the same app pool and base directory.
  • sl3dg3
    sl3dg3 over 11 years
    Yeah, there are many apps running in the root, so I reckon I will stick to my workaround.