[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Rewrite Rule Help



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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]