Rewrite Rule Help

Matthew Saltzman mjs at ces.clemson.edu
Thu Sep 28 12:30:23 UTC 2006


On Wed, 27 Sep 2006, jim martin wrote:

> Hi.. I need the following Rewrite Rule now,
>
> RewriteEngine on
>        RewriteCond %{HTTP_HOST} ^www.ABC.com$ [NC]
>        RewriteRule ^(.*)$ http://www.XYZ.com [R,L]
>
> So it will redirect www.ABC.com to www.XYZ.com but our developer has the requirement to redirect
> www.ABC.com/doc/abc.html to www.XYZ.com/doc/abc.html and www.ABC.com/old/ccc.html to
> www.XYZ.com/old/ccc.html and etc
>
> How should I change my Rewrite Rule?

Not really on topic here, and there's plenty of good documentation at 
www.apache.org (if you can have some patience with it).  But FWIW, how 
about

 	RewriteRule ^(.*)$ http://www.XYZ.com/$1 [R,L]

-- 
 		Matthew Saltzman

Clemson University Math Sciences
mjs AT clemson DOT edu
http://www.math.clemson.edu/~mjs




More information about the fedora-list mailing list