|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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 |
|
#2
|
||||
|
||||
|
Maybe this can help you http://forums.devshed.com/showthrea...=virtual+domain
__________________
My blog Tutorials about OSS databases, DBMonster ... Contribute to OSS Development, fill bug reports! Developer Shed eSupport Commented my.ini/my.cnf (ADD YOUR OWN CONFIG TRICK) An introduction to database normalization Natural or Surrogate key Custom ordering for your results Correlated and uncorrelated subqueries Don't turn your outer joins into inner joins Random data (with a bias) |
|
#3
|
|||
|
|||
|
No, this isn't relevant.
Can anyone tell me how to do it? Many thanks James |
|
#4
|
||||
|
||||
|
<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. |
|
#5
|
|||
|
|||
|
>> 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. |
|
#6
|
|||
|
|||
|
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 |
|
#7
|
|||
|
|||
|
>> 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. |
|
#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 ![]() |
|
#9
|
|||
|
|||
|
You can try RedirectPermanent if you don't want people to go to your old site anymore.
|
|
#10
|
|||
|
|||
|
Brilliant!! That does it.
thanks again freebsd!! |
![]() |
| Viewing: Dev Shed Forums > System Administration > Apache Development > How do you point one internet site to another please? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|