I'm sure I'm headed for another facepalm moment. :-) We are setting up a Worpress site, and have incoming uri's like this . . .
2008/08/12/some-topic-here/
2009/10/14/another-topic-here/
911/2009/08/06/blah-de-blah/
which need redirection, easy enough, I thought . . .
RewriteRule ^2008|2009|2010|911/\d{2,4}/\d{2}/\d{0,2}/*.* /some-category/ [R=301,NC,L]
It may seem excessive, but what comes after the dates vary greatly, from / to no / to long indeterminate strings, and there's about 400 of them, this one line captures them all.
However, our direct links to images . . .
/wp-content/uploads/2010/08/10/123456.jpg
are getting 301'ed and it's this one line that's doing it. Which they shouldn't, right? ^ = beginning of pattern . . .
I've got it temporarily fixed with
RewriteCond %{REQUEST_URI} !wp-content
RewriteRule ^2008|2009|2010|911/\d{2,4}/\d{2}/\d{0,2}/*.* /some-category/ [R=301,NC,L]
But I shouldn't need it. Sure I'm missing something stupid . . .