Forum Moderators: phranque

Message Too Old, No Replies

keeping original url in browser bar

.htaccess redirect

         

stu2

2:39 am on May 22, 2006 (gmt 0)

10+ Year Member



Is there a way to keep the original url in the browser bar when doing a redirect in .htaccess? I'm currently using this...

RewriteCond %{HTTP_HOST} ^example.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.example.com$
RewriteRule ^(.*)$ [example2.com...] [R=301,L]

jdMorgan

3:39 am on May 22, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



No, the definition of a redirect is that it sends a response to the client (browser) telling it that the respirce has moved, and the that client should re-request that resource using a new URL, also provided in the redirect response.

You might want to look into proxying domain2 through domain1, but of course, all connections would then pass through both servers, and the log files on domain2 would always show domain1 as the requestor.

JIm