Add a domain pointer using your Site Manager. Then you can programically redirect that domain to subfolder.
Then you need to create a subfolder under your root via FTP, and upload your second site there. Use a redirect script so that the domain pointer is redirected to the subfolder.
i've created the sub folder, but i'm not sure how to make the redirect script. Also, i don't have the domain on this host, what info do i need to link the domain to this sub folder?
i've had a look at the example in the knowledge base. but i'm a little lost as to how to use it. <% If InStr( UCase(Request.ServerVariables("SERVER_NAME")), UCase("subdomain1.HostingAccountDomain.com") ) > 0 Then Response.Redirect("/subdomain1") ElseIf InStr( UCase(Request.ServerVariables("SERVER_NAME")), UCase("subdomain2.HostingAccountDomain.com") ) > 0 Then Response.Redirect("/subdomain2") ElseIf InStr( UCase(Request.ServerVariables("SERVER_NAME")), UCase("subdomain3.HostingAccountDomain.com") ) > 0 Then Response.Redirect("/subdomain3/home.asp") End If %> Where should i be putting this in my asp.net site? I know what to change "subdomain1.HostingAccountDomain.com" and "/subdomain1" but what do i change "SERVER_NAME" to?
The redirect script is actually setup at the top of your startup page on the root. "SERVER_NAME" should remain the same.
I have been trying to get this one as well here is the code I put at the top of index page of root <% If InStr( UCase(Request.ServerVariables("SERVER_NAME")), UCase("liquidsoulsessence.hereiamlive.com") ) > 0 Then Response.Redirect("http://liquidsoulsessence.com") End If %> but it does not work
also tried this: <% If InStr( UCase(Request.ServerVariables("SERVER_NAME")), UCase("liquidsoulsessence.hereiamlive.com") ) > 0 Then Response.Redirect("/liquidsoulsessence") End If %>
Are you sure its not working? Base off this telnet test it shows that it is being redirected. GET / HTTP/1.1 HOST: liquidsoulsessence.hereiamlive.comHTTP/1.1 302 Found Cache-Control: private Content-Type: text/html; charset=utf-8 Location: /liquidsoulsessence Server: Microsoft-IIS/7.0 X-AspNet-Version: 2.0.50727 X-Powered-By: ASP.NET Date: Wed, 07 Jul 2010 23:14:36 GMT Connection: close Content-Length: 138 <html><head><title>Object moved</title></head><body> <h2>Object moved to <a href="%2fliquidsoulsessence">here</a>.</h2> </body></html> Connection to host lost. C:\>
when i type http://liquidsoulsessence.hereiamlive.com/ it is indeed there but when I type www.liquidsoulsessence.com/ it is not and that was the goal
OK ... I got it while writing that last post It came to me to simply put liquidsoulsessence.com instead of liquidsoulsessence.hereiamlive.com and it is all good now Thanks for your help
i still haven't got this to work yet. This is my whole index.html page, is this correct? <% If InStr( UCase(Request.ServerVariables("SERVER_NAME")), UCase("dirtycityhearts.com") ) > 0 Then Response.Redirect("/DirtyCityHearts") End If %> <html> <header> <title>Firefly Beach Design Group</title> </header> <body> <img src="Firefly-Logo-3.png" alt="Coming Soon" /> </body> </html>
thanks that seemed to work. When i go to the redirected site the domain is... http://www.dirtycityhearts.com/DirtyCityHearts/ is it possible to get it to be just http://www.dirtycityhearts.com
The URL rewrite module inside IIS 7 Manager will help you accomplish this. Try looking at this link. http://learn.iis.net/page.aspx/460/using-the-url-rewrite-module/
I will create a new thread later. I finally got a set of rules that will handle everything properly including ajax.