Quick Search for:  in language:    
easy,host,multiple,websites,address
   Code/Articles » |  Newest/Best » |  Community » |  Jobs » |  Other » |  Goto » | 
CategoriesSearch Newest CodeCoding ContestCode of the DayAsk A ProJobsUpload
ASP/ VbScript Stats

 Code: 196,174. lines
 Jobs: 107. postings

 How to support the site

 
Sponsored by:

 
You are in:
 
Login


 

 


Latest Code Ticker for ASP/ VbScript.
Automatic Form Insertion To Database
By Yasar Bayar on 1/11


Click here to see a screenshot of this code!Find Closest Physical Location (based on zip code, etc)
By Mark Kahn on 1/11

(Screen Shot)

String --> SQL Search Query
By Mark Kahn on 1/11


Replace text/Numbers for Images...
By Kenneth Nilsson on 1/9


INSERT sentence generator
By Eitan Rousso on 1/8


Employee Time Clock
By Dennis F. Corbitt on 1/8


[[_____Send Email through ASP , ( CDO ) mail
By Prince Joseph vm on 1/8


Click here to see a screenshot of this code!Debug Info v2.1 - Page footer based info display
By Hunter Beanland on 1/7

(Screen Shot)

inTouch Web Desk
By Gary Cowling on 1/6


Click here to put this ticker on your site!


Add this ticker to your desktop!


Daily Code Email
To join the 'Code of the Day' Mailing List click here!

Affiliate Sites



 
 
   

Multiple websites on One IP

Print
Email
 

Submitted on: 11/20/2003 8:04:10 AM
By: Richard J Mackey 
Level: Beginner
User Rating: Unrated
Compatibility:ASP (Active Server Pages)

Users have accessed this article 1673 times.
 
 
     An easy way to host multiple websites on one IP address

This article has accompanying files

 
 
Terms of Agreement:   
By using this article, you agree to the following terms...   
1) You may use this article in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.   
2) You MAY NOT redistribute this article (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
3) You may link to this article from another website, but ONLY if it is not wrapped in a frame. 
4) You will abide by any additional copyright restrictions which the author may have placed in the article or article's description.
In IIS 5.x (XP or 2k) the user is only permitted one web site. This is a work around that allows multiple websites to be hosted on one IP. In my situation I am using a DNS to point all 3 of my sites to my single IP. I then have a default.asp page that handles the re-direction to the proper start page for the website requested. The key parts: The use of the Web_Site_#. This is used 6 times with the only change being the use (obviously) of the name of your website. In my case it also included the use of three different web types( .com, .us, and .net ). You will notice the use of one instance where the url does not have the "www" while the other does. This allows web surfers to find your page with or with out the use of the "www" in their browser. The use of three redirect pages. When the if statement finds a match the ASP code redirects the browser to the proper start page for that site. The url of the website(less the actual page address is displayed in the surfers browser and they are none the wiser that they were redirected. The final else which redirects to index.htm sends the surfer to my main IP address which has links to all three sites. This is the page that all surfers will see if they enter just my IP address. You can put anything in your index.htm that you like. My first submission so please be kind. If you have questions or advise feel free to contact me.

winzip iconDownload article

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. Afterdownloading it, you will need a program like Winzip to decompress it.

Virus note:All files are scanned once-a-day by Planet Source Code for viruses,but new viruses come out every day, so no prevention program can catch 100% of them.

FOR YOUR OWN SAFETY, PLEASE:
1)Re-scan downloaded files using your personal virus checker before using it.
2)NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.

If you don't have a virus scanner, you can get one at many places on the net including:McAfee.com

 
Terms of Agreement:   
By using this article, you agree to the following terms...   
1) You may use this article in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.   
2) You MAY NOT redistribute this article (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
3) You may link to this article from another website, but ONLY if it is not wrapped in a frame. 
4) You will abide by any additional copyright restrictions which the author may have placed in the article or article's description.


Other 1 submission(s) by this author

 

 
Report Bad Submission
Use this form to notify us if this entry should be deleted (i.e contains no code, is a virus, etc.).
Reason:
 
Your Vote!

What do you think of this article(in the Beginner category)?
(The article with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor See Voting Log
 
Other User Comments
11/20/2003 8:16:10 AM:Richard J Mackey
Sorry--It striped the code out and so far unable to locate details on how to correct
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
11/20/2003 8:56:46 AM:Mark Kahn
be more specific...IIS5 allows unlimited websites. The version shipped with XP or 2k Pro only allows one.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
11/20/2003 9:27:04 AM:Sarafraz Singh Johl
well i haven't looked at code yet. but one question. which site will open if i type "http://IP_ADDRESS" cassamine
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
11/20/2003 11:02:38 AM:Richard J Mackey
In my case as set up in the final else in the code it will redirect the surfer to then index.htm page which has links to all three of my sites
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
Add Your Feedback!
Note:Not only will your feedback be posted, but an email will be sent to the code's author in your name.

NOTICE: The author of this article has been kind enough to share it with you.  If you have a criticism, please state it politely or it will be deleted.

For feedback not related to this particular article, please click here.
 
Name:
Comment:

 

Categories | Articles and Tutorials | Advanced Search | Recommended Reading | Upload | Newest Code | Code of the Month | Code of the Day | All Time Hall of Fame | Coding Contest | Search for a job | Post a Job | Ask a Pro Discussion Forum | Live Chat | Feedback | Customize | ASP/ VbScript Home | Site Home | Other Sites | About the Site | Feedback | Link to the Site | Awards | Advertising | Privacy

Copyright© 1997 by Exhedra Solutions, Inc. All Rights Reserved.  By using this site you agree to its Terms and Conditions.  Planet Source Code (tm) and the phrase "Dream It. Code It" (tm) are trademarks of Exhedra Solutions, Inc.