View previous topic :: View next topic |
Author |
Message |
tdi Apprentice
Joined: 25 Aug 2004 Posts: 170
|
Posted: Mon Apr 11, 2005 6:18 am Post subject: [SOLVED] DNS alias |
|
|
is it possible to set dns alias o sercer A pointing to webpage at server B ?
Last edited by tdi on Mon Apr 11, 2005 6:11 pm; edited 1 time in total |
|
Back to top |
|
|
tukachinchila Apprentice
Joined: 11 Mar 2005 Posts: 274 Location: Oregon
|
Posted: Mon Apr 11, 2005 7:58 am Post subject: |
|
|
I'm not sure I understand the question. Do you want to be able to enter in the address of one website locally, but have it redirect you to another site? Or are you trying to redirect remote users attempting to access your server, sending them to another server instead?
In the first case, you could probably just add an entry into /etc/hosts. In the second case, I think you'd want to set up NAT and port forwarding (this doc might help you: http://www.gentoo.org/doc/en/home-router-howto.xml#doc_chap6). |
|
Back to top |
|
|
fvant Guru
Joined: 08 Jun 2003 Posts: 328 Location: Leiden, The Netherlands
|
|
Back to top |
|
|
tdi Apprentice
Joined: 25 Aug 2004 Posts: 170
|
Posted: Mon Apr 11, 2005 5:58 pm Post subject: |
|
|
i want remote users to type foo.bar.com and be redirected to foo.bar.com.pl (foo.bar.com.pl is not on my server) for exapmle
Last edited by tdi on Mon Apr 11, 2005 6:03 pm; edited 1 time in total |
|
Back to top |
|
|
rouben Apprentice
Joined: 07 Feb 2005 Posts: 159 Location: Thornhill, ON, Canada
|
Posted: Mon Apr 11, 2005 6:02 pm Post subject: |
|
|
I don't know if anyone can propose a more elegant solution, but you could create a VirtualHost for foo.bar.com with the following configuration directive (using mod_alias):
Code: | Redirect permanent / http://foo.bar.com.pl/ |
This should do it, the only downside is that you need a VirtualHost definition. There might be a more elegant solution to this, however, I can't think of anything else ATM. |
|
Back to top |
|
|
tdi Apprentice
Joined: 25 Aug 2004 Posts: 170
|
Posted: Mon Apr 11, 2005 6:10 pm Post subject: |
|
|
thanks... that was what i wanted to achieve... thank a lot |
|
Back to top |
|
|
rouben Apprentice
Joined: 07 Feb 2005 Posts: 159 Location: Thornhill, ON, Canada
|
Posted: Mon Apr 11, 2005 6:17 pm Post subject: |
|
|
tdi wrote: | thanks... that was what i wanted to achieve... thank a lot |
You're quite welcome. By the way, if you're feeling adventurous, you might also want to consider using mod_rewrite to achieve the same result without having to define a VirtualHost. It's not for the faint of heart, though. |
|
Back to top |
|
|
|