This issue has been a pain in my rear for a while now. I own this domain: let's call it domain.com which I registered with no-ip.com. I then signed up with www.Winhost.com to host my DNN 6 website so I pointed no-ip.com to Winhost.com which seemed to work. The problem I am having now is: I installed DNN 6 through Winhost CPanel. When I access www.domain.com the website is under construction but when I visit www.domain.com/dotnetnuke then I reach my portal (dotnetnuke being the name of the portal). How can I redirect from domain.com to the child portal (www.domain.com/dotnetnuke) with IIS 7? Is redirects an option and can you send me an example of how would do this in quite some detail? Please can somebody help me out.
http://support.Winhost.com/KB/a649/how-to-redirect-a-subdomain-to-a-subdirectory.aspx <% If InStr( UCase(Request.ServerVariables("SERVER_NAME")), UCase("domain.com") ) > 0 Then Response.Redirect("/dotnetnuke") ElseIf InStr( UCase(Request.ServerVariables("SERVER_NAME")), UCase("www.domain.com") ) > 0 Then Response.Redirect("/dotnetnuke") End If %> http://learn.iis.net/page.aspx/460/using-the-url-rewrite-module/
Hi Allegro13, I am currently using regular expressions in IIS which modifies the webconfig as follows: <rules> <rule name="RedirectSubDomain" stopProcessing="true"> <match url=".*" /> <action type="Redirect" url="http://domain/dotnetnuke/{R:0}" /> <conditions> <add input="{HTTP_HOST}" pattern="^domain\.com$" /> </conditions> </rule> </rules> I'm not sure what you have given me or what to do with it. Please can you assist
that was Vb.NET code that you put on homepage (page load event) to do the redirection as per this article http://support.Winhost.com/KB/a649/how-to-redirect-a-subdomain-to-a-subdirectory.aspx using IIS redirection will do the same and technically faster since it doesn't require page load.