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:
    Code:
    <rule name="devmy.xx.com">
                        <match url=".*" />
                        <conditions>
                            <add input="{HTTP_HOST}" pattern="^(devmy.)xx.com" />
                            <add input="{PATH_INFO}" pattern="^/devmy/" negate="true" />
                        </conditions>
                        <action type="Rewrite" url="\folder1\folder2\subdomainfolder\{R:0}" />
                    </rule>
    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