Quantcast

Maximum PC

It is currently Fri Dec 19, 2014 5:19 am

All times are UTC - 8 hours




Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: Running two websites with one IP address - Redirect by URL
PostPosted: Mon Nov 17, 2008 1:46 pm 
Team Member
Team Member
User avatar

Joined: Tue Dec 11, 2007 9:05 am
Posts: 76
I want to know if it’s possible to host two websites on the same server using the same port (80) and IP address. I am limited to using Microsoft IIS 7.0 not apache, but I can run PHP on it. (One of the sites is Joomla based)

If I register two domain names to, example1.com and example2.com, to IP address xx.xxx.xxx.xxx is there a script I could run or an IIS setting I could change so that users are redirected to a different folder or index page based on which domain name they use? Also if this is done with a PHP script or something similar would search engines index both pages correctly?

I know similar results can be achieved with Apache by using Virtual hosts in the httpd.conf file, but unfortunately I don’t know if this is possible with IIS.

Thanks for the help


Top
  Profile  
 
 Post subject: Re: Running two websites with one IP address - Redirect by U
PostPosted: Fri Dec 19, 2008 7:34 am 
Super Mario Banhammer
Super Mario Banhammer

Joined: Fri Aug 25, 2006 11:20 am
Posts: 595
joseph4.0 wrote:
I want to know if it’s possible to host two websites on the same server using the same port (80) and IP address. I am limited to using Microsoft IIS 7.0 not apache, but I can run PHP on it. (One of the sites is Joomla based)

If I register two domain names to, example1.com and example2.com, to IP address xx.xxx.xxx.xxx is there a script I could run or an IIS setting I could change so that users are redirected to a different folder or index page based on which domain name they use? Also if this is done with a PHP script or something similar would search engines index both pages correctly?

I know similar results can be achieved with Apache by using Virtual hosts in the httpd.conf file, but unfortunately I don’t know if this is possible with IIS.

Thanks for the help


It is possible with IIS and has been since IIS 5.0. You need to do some research on Subwebs and virtual folders in IIS as there are many many different ways to implement this and no one method is going to be right for everyone. Basically there are Identities for each website under IIS and depending on your needs you may want a url redirect like http://www.somedomain.com/subweb1.htm?=somenewsite.aspx and http://www.somedomain.com/subweb1.htm?= ... wsite.aspx or you may need to assign headers for a site (too many approaches to discuss here) or you may need http://www.domain1.com and http://www.domain2.com. There are also commercial applications and opensource applications that allow you to redirect onto their domains as either a subweb or a top level domain.

HTH


Top
  Profile  
 
 Post subject:
PostPosted: Fri Dec 19, 2008 7:40 am 
Java Junkie
Java Junkie
User avatar

Joined: Mon Jun 14, 2004 10:23 am
Posts: 24238
Location: Granite Heaven
Two websites on one server? Why not? Apache does that out of the box.


Top
  Profile  
 
 Post subject:
PostPosted: Fri Dec 19, 2008 8:48 am 
Super Mario Banhammer
Super Mario Banhammer

Joined: Fri Aug 25, 2006 11:20 am
Posts: 595
Jipstyle wrote:
Two websites on one server? Why not? Apache does that out of the box.


Jipstyle the reason is this from the original post:
Quote:
I am limited to using Microsoft IIS 7.0 not apache


Top
  Profile  
 
 Post subject:
PostPosted: Fri Dec 19, 2008 8:50 am 
Super Mario Banhammer
Super Mario Banhammer

Joined: Fri Aug 25, 2006 11:20 am
Posts: 595
Im assuming that he has requirements that say he must use IIS 7.0 or that he may not use Apache. Not sure why as Apache or Web Sphere are generally speaking more extensible than IIS


Top
  Profile  
 
 Post subject:
PostPosted: Fri Dec 19, 2008 9:00 am 
Team Member
Team Member
User avatar

Joined: Tue Dec 11, 2007 9:05 am
Posts: 76
Jipstyle wrote:
Two websites on one server? Why not? Apache does that out of the box.


I am perfectly aware of this, but unfortunately I can’t use apache, as I stated above.

For some reason one of the people who maintains the server is convinced that IIS is more stable than Apache. No idea why he just is.

I am having some success using host headers in IIS, but I see how it works out.


Top
  Profile  
 
 Post subject:
PostPosted: Fri Dec 19, 2008 9:28 am 
Java Junkie
Java Junkie
User avatar

Joined: Mon Jun 14, 2004 10:23 am
Posts: 24238
Location: Granite Heaven
Sorry, I missed that in your first post. My bad.

I don't understand why any web server is unable to serve more than one site using the same port. Makes absolutely no sense to me.


Top
  Profile  
 
 Post subject:
PostPosted: Fri Dec 19, 2008 10:33 am 
Super Mario Banhammer
Super Mario Banhammer

Joined: Fri Aug 25, 2006 11:20 am
Posts: 595
joseph4.0 wrote:
Jipstyle wrote:
Two websites on one server? Why not? Apache does that out of the box.


I am perfectly aware of this, but unfortunately I can’t use apache, as I stated above.

For some reason one of the people who maintains the server is convinced that IIS is more stable than Apache. No idea why he just is.

I am having some success using host headers in IIS, but I see how it works out.


Im guessing this guy is the owner of the hardware and licenses? If so, Im sorry I feel your pain. Perhaps if he isnt a complete fughead you could show him otherwise. If he is a complete fughead use The headers as you can and bite your tongue :)


Top
  Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group

© 2014 Future US, Inc. All rights reserved.