65.9K
CodeProject is changing. Read more.
Home

Multiple domains on a single IP

starIconstarIconstarIcon
emptyStarIcon
starIcon
emptyStarIcon

3.89/5 (8 votes)

Nov 1, 2000

viewsIcon

148828

How to set multiple domains one a single IP-address with ASP.

Multiple domains on a single IP address

Sorry for this very short article. I didn't have much time to think of a complete description so I guess the ASP code has to speak for itself. :)

 <%
 host = lcase(request.servervariables("HTTP_HOST"))
 SELECT CASE host
 	CASE "www.chatventure.com"
 		response.redirect "http://212.187.35.210/chatventure/main.htm"
 	CASE "www.cewebserver.com"
 		response.redirect "http://212.187.35.210/cewebserver/main.htm"
 	CASE ELSE
 		response.redirect "http://www.codeproject.com"
 END SELECT
 %>

I use it own my own web server, hosting the domains chatventure.com and cewebserver.com. Feel free to take a visit. ;)