Apache Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsSystem AdministrationApache Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old January 10th, 2002, 03:53 AM
jamesf4218 jamesf4218 is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Mar 2001
Location: England
Posts: 673 jamesf4218 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 27 m
Reputation Power: 8
How do you point one internet site to another please?

Hello,

We have two websites hosted on the same server. They are separated by one IP address, they have their own ftp areas etc.

What I would like to do now is to change it so that when you type in the address of one of the websites the users are automatically forwarded to the other site.

I am quite new to Apache. Can anyone talk me through how to do this please?

Many thanks

James

Reply With Quote
  #3  
Old January 10th, 2002, 06:26 AM
jamesf4218 jamesf4218 is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Mar 2001
Location: England
Posts: 673 jamesf4218 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 27 m
Reputation Power: 8
No, this isn't relevant.

Can anyone tell me how to do it?

Many thanks

James

Reply With Quote
  #4  
Old January 10th, 2002, 08:50 AM
pabloj's Avatar
pabloj pabloj is offline
Modding: Oracle MsSQL Firebird
Dev Shed God 6th Plane (7500 - 7999 posts)
 
Join Date: Jun 2001
Location: Outside US
Posts: 7,917 pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level) 
Time spent in forums: 2 Months 3 Weeks 3 Days 15 h 52 m 3 sec
Reputation Power: 279
<VirtualHost *>
ServerAdmin you@yourdomain.com
DocumentRoot /web/yourdomain.com/html
ServerName www.yourdomainone.com
ErrorLog /web/yourdomain.com/logs/yourdomain.com-error_log
CustomLog /web/yourdomain.com/logs/yourdomainone.com-access_log common
</VirtualHost>
<VirtualHost *>
ServerAdmin you@yourdomain.com
DocumentRoot /web/yourdomain.com/html
ServerName www.yourdomaintwo.com
ErrorLog /web/yourdomain.com/logs/yourdomain.com-error_log
CustomLog /web/yourdomain.com/logs/yourdomaintwo.com-access_log common
</VirtualHost>

If this doesn't apply it might be a DNS problem, I think that the right man is freebsd, try with a pm.

Reply With Quote
  #5  
Old January 10th, 2002, 12:46 PM
freebsd freebsd is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Posts: 5 freebsd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
>> the users are automatically forwarded to the other site

So both sites should have the same content but with different ServerName which resolve to the same IP.

You just need one <VirtualHost> like so:

<VirtualHost *>
ServerName www.site1.com
ServerAlias www.site2.com
DocumentRoot /www/htdocs
...
...
</VirtualHost>
<VirtualHost *>
ServerName www.anothervhost.com
DocumentRoot /www/vhosts/anothervhost/htdocs
...
</VirtualHost>

So www.site1.com and www.site2.com are the same site. No redirection is ever needed.

Reply With Quote
  #6  
Old January 16th, 2002, 09:01 AM
charkus charkus is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2001
Location: Bath, England
Posts: 312 charkus User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 28 m 14 sec
Reputation Power: 8
I have sites set up this way, but have found a problem. Search engine spiders see the sites as exact duplicates (which they are!) .

What i need to do is use the Apache redirect options, but I can't seem to get them to work. I've read the Apache site and used the example there (added to srm.conf) but it just doesn't work.

Does anyone have any experience of this? (FreeBSD, I bet you know this )

Thanks,
__________________
Charkus

Reply With Quote
  #7  
Old January 16th, 2002, 05:34 PM
freebsd freebsd is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Posts: 5 freebsd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
>> spiders see the sites as exact duplicates (which they are!)

As I said, you don't need to use any redirection, if they are the same site.

>> FreeBSD, I bet you know this

Sorry I don't know why you need to use redirection at all. Please give me a valid reason.

Reply With Quote
  #8  
Old January 18th, 2002, 03:47 AM
charkus charkus is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2001
Location: Bath, England
Posts: 312 charkus User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 28 m 14 sec
Reputation Power: 8
Ok. The search engine already has the original site listed. When the spider finds the new site it decides it is just a duplicate site and ignores it.

If I setup the original site as a redirect, when the spider finds the original site again, it realises it has changed and updates the database, then it doesn't treat the new site as a duplicate.

See the problem? All I want is to be able to set up redirects with Apache

Reply With Quote
  #9  
Old January 18th, 2002, 09:16 AM
freebsd freebsd is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Posts: 5 freebsd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
You can try RedirectPermanent if you don't want people to go to your old site anymore.

Reply With Quote
  #10  
Old January 18th, 2002, 09:33 AM
charkus charkus is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2001
Location: Bath, England
Posts: 312 charkus User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 28 m 14 sec
Reputation Power: 8
Brilliant!! That does it.

thanks again freebsd!!

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationApache Development > How do you point one internet site to another please?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
Stay green...Green IT