PDA

View Full Version : hosting with multipledomains



pablosci
February 8th, 2006, 06:36 PM
hi
i wanna know if someone knows a hosting service that support that differents domains go to diferents folder on the server, like multiple web sites on the same service. i cant find a good service that allow me to do that.
my idea is to put differents websites on the same hosting.
thanks

hl
February 8th, 2006, 06:46 PM
hi
i wanna know if someone knows a hosting service that support that differents domains go to diferents folder on the server, like multiple web sites on the same service. i cant find a good service that allow me to do that.
my idea is to put differents websites on the same hosting.
thanks
Can't believe you haven't found anything yet...

what you're looking for is called an add on domain.

pablosci
February 8th, 2006, 07:06 PM
but, if a server doesnt allow add on domains, and i put a script as index.htm that redirect according to the domain writed to a sub folder, i dont need this add on?

Yeldarb
February 8th, 2006, 07:28 PM
www.dreamhost.com does

Templarian
February 8th, 2006, 07:40 PM
all hosting has this. i belive you just edit a file (i dont know it could be the .htaccess never looked), and it will just redirect you to the specific site/ location. And or look around in the setting harder. (1and1.com takes 2 seconds to do this lol).

pablosci
February 9th, 2006, 03:31 PM
like this?


<html>

<head>

<title>Redirect Script with JavaScript</title>

<script language=javascript>

var whois=location+" "



if (whois.indexOf("yourdomain.com") != -1)

{ window.location ="page1.html" }



if (whois.indexOf("www.yourdomain.com") != -1)

{ window.location ="page1.html" }



if (whois.indexOf("yourotherdomain.com") != -1)
{ window.location ="page2.html" }



if (whois.indexOf("www.yourotherdomain.com") != -1)

{ window.location ="page2.html" }



if (whois.indexOf("subdomain1.yourdomain.com") != -1)

{ window.location ="page3.html" }



if (whois.indexOf("subdomain2.yourdomain.com") != -1)

{ window.location ="page4.html" }



</script>

</head>

<body>

</body>

</html>



or this?


<%@Language=VBScript%>

<%

SiteNameURL = Request.ServerVariables("SERVER_NAME")



Select Case SiteNameURL

Case "yourdomain.com"

%><!-- #Include File="page1.asp" --><%



Case "www.yourdomain.com"

%><!-- #Include File="page1.asp" --><%



Case "yourotherdomain.com"

%><!-- #Include File="page2.asp" --><%



Case "www.yourotherdomain.com"

%><!-- #Include File="page2.asp" --><%



Case "subdomain1.yourdomain.com"

%><!-- #Include File="page3.asp" --><%



Case "subdomain2.yourdomain.com"

%><!-- #Include File="page4.asp" --><%



Case Else 'redirecting everything other than cases selected above

%><!-- #Include File="other.asp" --><%

End Select

%>