"Jim Hayter" <see.reply.to@nowhere.invalid> wrote in message
news:13tddekqbbnic99@news.supernews.com...
> Trammel wrote:
> > "Terry" <tknoat@wejuggle.com> wrote in message
news:1205073366_480@isp.n...
> >> I am trying to do some local testing of re-directs. I need to be able
> >> to take site1/page1.html and re-direct it to site2/pageX.php I wrote
> >> one for page1.html to page1.php but so far I am having no luck with
> >> changing directories.
> >>
> >> A point in the right direction would be greatly appreciated.
> >
> > Try this & let us know if it worked?:
> >
> > RewriteEngine on
> > RewriteLog "rewrite.log"
> > RewriteLogLevel 1
> > RewriteCond %{REQUEST_URI} ^mysite.com/page1.html$ [NC]
> > RewriteRule ^mysite.com/page1.html$
http://www.theirsite.com/pagex.php
> ^^^^^^^^^^
> I don't think that should be there. You can't test the host name in a
> RewriteRule that way.
>
> > [NC,R,L]
> >
> > ^ = Start of string
> > $ = End of string
> > NC = NoCase (Not case sensitive)
> > R = Redirect (external-like)
> > L = Last rule (Dont process more for this condition)
Ok... so test in the vhosts file (without the original site being stated):
RewriteEngine on
RewriteLog "rewrite.log"
RewriteLogLevel 1
RewriteCond %{REQUEST_URI} ^/page1.html$ [NC]
RewriteRule ^/page1.html$
http://www.theirsite.com/pagex.php [NC,R,L]