Helllo, I have a domaine "mydomain.com" - I'd like have www.mydomain.com to directory /website - I'd like have test.mydomain.com to directory /test I tried the KB below but not work http://support.Winhost.com/KB/a649/how-to-redirect-a-subdomain-to-a-subdirectory.aspx
Read this blog: http://blog.benpowell.co.uk/2010/02/Winhostcom-how-to-really-run-multiple.html It will guide you on how to host multiple websites within a single site account.
I tried with the script below, the main site is ok but not the subdomain, the error is "Google Chrome could not find sub1.mydomain.com" (same with other browser) The script is : Code: <?xml version="1.0" encoding="UTF-8"?> <configuration> <system.webServer> <modules runAllManagedModulesForAllRequests="true" /> <rewrite> <rules> <rule name="Rewrite to folder1" stopProcessing="true"> <match url="(.*)" /> <conditions> <add input="{HTTP_HOST}" pattern="^www.mydomain.com$" /> </conditions> <action type="Rewrite" url="main/{R:1}" /> </rule> <rule name="Rewrite to folder2" stopProcessing="true"> <match url="(.*)" /> <conditions> <add input="{HTTP_HOST}" pattern="^sub1.mydomain.com$" /> </conditions> <action type="Rewrite" url="sub1/{R:1}" /> </rule> </rules> </rewrite> </system.webServer> </configuration>
I would have to take a look at your site. You can send me a private message regarding the domain name so I can look it up if you do not want to display it here.
Similar issue: I am trying to point subdomain http://perfectlypaired.bernhardtwinery.com to a subdirectory http://bernhardtwinery.com/perfectlypaired with no luck. I've tried the IIS URL rewrite and also editing the web.config directly using several different examples from the forums - still no luck. Can anyone assist? This is what I have: <?xml version="1.0" encoding="UTF-8"?> <configuration> <system.webServer> <defaultDocument> <files> <clear /> <add value="index.asp" /> <add value="index.html" /> <add value="default.html" /> <add value="default.htm" /> <add value="default.asp" /> </files> </defaultDocument> <rewrite> <rules> <rule name="Redirect subdomain" enabled="true"> <match url="^(.*)$" /> <conditions> <add input="{HTTP_HOST}" pattern="^perfectlypaired\.bernhardtwinery\.com$" /> </conditions> <action type="Rewrite" url="perfectlypaired/{R:1}" /> </rule> </rules> </rewrite> <directoryBrowse enabled="false" /> </system.webServer> </configuration>
This should be the correct rule markup: Code: <rewrite> <rules> <rule name="Rewrite to perfectlypaired.bernhardtwinery.com" stopProcessing="true"> <match url="(.*)" /> <conditions> <add input="{HTTP_HOST}" pattern="^perfectlypaired.bernhardtwinery.com$" /> </conditions> <action type="Rewrite" url="perfectlypaired/{R:1}" /> </rule> </rules> </rewrite>