Print Page | Close Window

Domains

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=14878
Printed Date: 30 March 2026 at 6:55am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Domains
Posted By: Scott07
Subject: Domains
Date Posted: 29 April 2005 at 8:12am
Is there a way with either ASP, IIS or the windows DNS server, to make two domains point to the same server but load different sites.  For excample say http://www.test1.com points to the root of the IIS web site (say http://webserver) and to make the second one point to a folder so http://www.test2.com would point to http://webserver/test.  I cam make the domains point to the same server but the only problem is they display the same thing at the moment because they point to the same site.  Is there a way to do this so two compleatly different sites can work on the same server but have no interconnection with each other.  Many thanks



Replies:
Posted By: dfrancis
Date Posted: 29 April 2005 at 8:48am
I've been doing it for years - using your example I can show you basically how to do it. I have several domain names sharing one website all with entirely different content, design and layout. (Helps with global file sharing.)
 
 Select Case Request.ServerVariables("SERVER_NAME")
  Case " http://www.test1.com - www.test1.com "
        Server.Transfer "/default.asp"
  Case "test1.com"
        Server.Transfer "/default.asp"  
  Case " http://www.test2.com - www.test2.com "
        Server.Transfer "/test/default.asp"
  Case "test2.com"
        Server.Transfer "/test/default.asp"  
  Case Else
        Server.Transfer "/pickadomain.asp"   
 End Select


Posted By: Lofty
Date Posted: 29 April 2005 at 9:11am
in IIS admin create a new site. you'll be prompted for the local path during the creation process. set it to whatever folder ya want.

to get a domain pointed to the server you'll need to either set the name servers and then run a dns server on your server..  or if you have access to add in A, MX and CNAME records for your domain at yiur registra then just set the A records to poijt to your server IP addy.  once thats done then it's down to IIS to laod up the files from the folder specified in the local path under the home directory tab.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net