Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to manage sub-domains on WinHost with IIS7 URL Rewrite 2.0?
    text
    copied!<p>I'm trying out <a href="http://www.winhost.com/" rel="nofollow noreferrer">WinHost</a> and I'm running into some issues with sub-domains. On WinHost, you can have multiple sub-domains per hosting account, but each sub-domain points to the root website. E.g. you can have www.example.com, sub1.example.com, and sub2.example.com but all of them display the content at <a href="http://www.example.com/" rel="nofollow noreferrer">http://www.example.com/</a>.</p> <p>Other Hosts allow you to point sub-domains to a sub folder in your website. This would allow you to point sub1.example.com to /sub1, sub2.example.com to /sub2 and www.example.com to /. </p> <p>WinHost recommends using an <a href="http://support.winhost.com/KB/a649/how-to-redirect-a-subdomain-to-a-subdirectory.aspx" rel="nofollow noreferrer">asp/aspx page</a> to redirect <a href="http://sub1.example.com" rel="nofollow noreferrer">http://sub1.example.com</a> to <a href="http://sub1.example.com/sub1" rel="nofollow noreferrer">http://sub1.example.com/sub1</a>, which points to /sub1. While that would work, I'd like to not have the subdomain in the url twice. </p> <p>So I tried using IIS7 URL Rewrite to point <a href="http://sub1.example.com" rel="nofollow noreferrer">http://sub1.example.com</a> to /sub1. Ben Powell describes this in detail on <a href="http://blog.benpowell.co.uk/2010/02/winhostcom-how-to-really-run-multiple.html" rel="nofollow noreferrer">his blog</a>. This is great, except Request.ApplicationPath is now /sub1/path/to/current/page.aspx, which breaks ASP.Net Themes (and probably other stuff too).</p> <p>What can I do to fix the ApplicationPath? Is there a better way to accomplish this?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload