locked
Redirect site to subdomain folder RRS feed

  • Question

  • User-718146471 posted

    I'm looking for ways to do this. I have a main site and then I want to put my sub-domain under the main site as a sub folder. Any ideas? I'm open to all suggestions. When I do http://touch.domain.com it goes to the main domain page even though I have the web.config configured to direct sub domains to sub folders like this:

     

    <rewrite>
       <rules>
          <rule name="Redirect subdomain" enabled="true">
             <match url="^(.*)$" />
             <conditions>
                <add input="{HTTP_HOST}" pattern="^sub\.example\.com$" />          </conditions>
             <action type="Rewrite" url="folder/{R:1}" />
          </rule>
       </rules>
    </rewrite>
    

    Any ideas what I'm doing wrong? Is it my pattern? Should .example be my domain name?
     

    Thursday, July 25, 2013 10:24 AM

Answers

  • User-718146471 posted

    Well, I decided to use a JS mobile detection script for the redirection since I didn't get any answers.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, July 26, 2013 12:04 PM