Home › Forums › Back End › [Solved] .htaccess mod_rewrite › Re: [Solved] .htaccess mod_rewrite
February 26, 2010 at 5:19 am
#71640
davesgonebananas
Member
What’s happening is /about/x.shtml matches with /our-school/about/x.html because it appears in the url (albeit at the end). This results in an infinite loop (or it would if apache didn’t limit the number of redirects allowed).
To restrict your pattern to the beginning of the url you use the beginning-of-line anchor (^). See if the following works:
Code:
RedirectMatch 301 ^/about/(.*).shtml http://trinityportland.org/our-school/about/$1.shtml