The following rewrite is resulting in an infinite loop.
Basically I want anything that goes to blog which contains letters or - for 2 directories after blog to redirect to tags using the $1.
I thought the following would work but it's not doing a good job as it results in the rewrite to be like this:
http://www.example.com/blog/tags/tags/index.html
This is not the desired effect but I assume it's doing that because it's redirecting again after the initial redirect. I tried to resolve that by checking request uri for the word tags. But that didn't resolve the problem :(
Any suggestions would be greatly appreciated.
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !^/tags/
RewriteRule ^/blog/([A-z\-]*)/([A-z\-]*)/index.html$ http://www.example.com/blog/tags/$1/index.html [R=301,L]