[thelist] 301 redirects in htaccess

David Kaufman david at gigawatt.com
Wed Jul 25 12:51:53 CDT 2012


On 7/25/2012 11:43 AM, Hassan Schroeder wrote:
> Ack! No, look at Anthony Baratta's post; the rule above, without any
> anchor at the beginning of the expression, will match the target URL
> as well and result in a "too many redirects" loop.
>

You're right Hassan - I neglected to test that.

Need to add a rewrite condition to prevent the infinite loop:

   RewriteEngine On
   Rewrite Base /
   RewriteCond %{REQUEST_URI}   !oldSite/
   RewriteRule blogViewer(.*)$  oldSite/blogViewer$1 [R,L]

...still untested though :-)

hth,

-dave


More information about the thelist mailing list