tags:

views:

686

answers:

2

i have a simple rewrite

RewriteRule ^.*$ addnew/$0

however i get the

Request exceeded the limit of 10 internal redirects due to probable configuration error.

I am trying to rewrite

www.mysite.com/anycharacter

into

www.mysite.com/addnew/anycharacter

A: 

.*matches addnew/. Try with:

RewriteRule ^[^/]*$ addnew/$0
RC
+1  A: 

As RC already said, .* will also match addnew/. And since the L flag causes a reinjection of the rewritten rule, you will get an infinite recursion.

So adjust the rule so it doesn’t match your addnew/:

RewriteRule !^addnew/ addnew%{REQUEST_URI}
Gumbo