There is an ASP.NET MVC 2 web application that can be called myapp.com. I need dynamic subdomains (user created categories) like something.myapp.com. So I configured to rewrite the URL by rewriting the rules something.myapp.com -> myapp.com/something (which is processed by MVC as follows ..). But the first ActionLink throws an exception
System.Web.HttpException: Cannot use host .. to exit top directory
because obviously the url for it is still something.myapp.com. Is there an elegant solution for this? I don't want to redirect (I want to save something.myapp.com url in browser). I also don't like the idea of โโwriting a custom ActionLink, the most basic in MVC ...
thanx guys :)
Roman
source share