URL rewrite SubDomain to folder

Discussion in 'DNS/Domain names' started by SuperRoo, Aug 18, 2012.

  1. Hi,
    I am using URL rerwriter to link my subdomain to a folder under the path
    folder1/folder2/subdomainfolder. I have the code:
    <rule name="devmy.xx.com">
                        <match url=".*" />
                            <add input="{HTTP_HOST}" pattern="^(devmy.)xx.com" />
                            <add input="{PATH_INFO}" pattern="^/devmy/" negate="true" />
                        <action type="Rewrite" url="\folder1\folder2\subdomainfolder\{R:0}" />
    Which works fine for the first page and then if that page calls a page2 I get the url:
    http:\\devmy.xx.com\folder1\folder2\subdomainfolder\page2.aspx which of course does not exist.
    How do I stop it adding the folder structure for all pages i.e. how do I make the subdomain appear as a base domain for this site?
  2. Elshadriel

    Elshadriel Winhost Staff

    Last edited by a moderator: Oct 14, 2015

Share This Page