SUMMARY: Apache Redirect on Solaris 8

From: Bhavesh Shah <bshah_at_citadon.com>
Date: Thu Mar 10 2005 - 18:10:38 EST
Thanks a lot to Dale Ghent, Frank Van Liedekerke and VEGH Karoly.
Special thanks to Dale...

The solution is:


     RewriteCond %{HTTP_HOST} ^www\.test1\.com$
     RewriteRule ^(.*)$ http://www.test2.com$1 [R=permanent]

Worked for me after I figured out it silly mistake I made was put
forward slash after $1.

My original question was:

Hi Gurus,

I have Apache 1.3.26 installed on Solaris 8. I am trying to redirect a
web site with Apache rewrite rule as below:

e.g.  redirect www.test1.com <http://www.test1.com/>  to www.test2.com
<http://www.test2.com/>





RewriteCond %{HTTP_HOST}    .*www.test1.com.*

RewriteRule  ^/(.*)                     http://www.test2.com$0
<http://www.test2.com$0/>  [R]



It redirects fine but address bar doesn't show the redirection. It still
shows www.test1.com <http://www.test1.com/>   instead of www.test2.com
<http://www.test2.com/>



In my DNS below is the entry



www.test1.com <http://www.test2.com/>  IN CNAME www.test2.com
<http://www.test2.com/> .



What could be wrong?

Any help pointer will be appreciated.

TIA

B
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers
Received on Thu Mar 10 18:11:10 2005

This archive was generated by hypermail 2.1.8 : Thu Mar 03 2016 - 06:43:44 EST