Forum Moderators: phranque

Message Too Old, No Replies

Is possible rewrite this?

         

Teschio

6:59 pm on Sep 30, 2005 (gmt 0)

10+ Year Member



Hi to all,
I have a domain www.test.com that is on a server and I also have a domain www.test.it that is on another server.

Id' like that when someone types www.test.com is redirected (mantaining www.test.com on address bar) to www.test.it contents.

example like:

RewriteCond %{HTTP_HOST} ^www\.test\.com
RewriteRule (.*) /home/web/www.test.it/website/$1

remembering that test.it is on another server..

how can i do this?
Thanks you all!

jdMorgan

9:58 pm on Sep 30, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The only way to do this is to proxy the request through the first serrver to the second server. This means each request will be handled by both servers. It also means that the logs on the second server will always show the requests as coming from the firt server, making the 'stats' rather useless.

It is complex, and I don't recommend that you do this unless it is extremely important and other methods, such as changing the DNS for the first domain, cannot be used.

Jim

Teschio

2:03 pm on Oct 1, 2005 (gmt 0)

10+ Year Member



I think you refer to mod_proxy...
How can I do this in the <VirtualHost www.test.com></VirtualHost>?
Thank you

Teschio

12:11 am on Oct 3, 2005 (gmt 0)

10+ Year Member



No idea?

jdMorgan

4:22 am on Oct 4, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



[httpd.apache.org...]

Jim