Results 1 to 9 of 9
Aug 16, 2011, 05:38 #1
- Join Date
- Aug 2011
- 0 Post(s)
- 0 Thread(s)
RewriteRule not matching regex correctly?
I have the following RewriteRule in my .htaccess file.
RewriteRule ^news/[a-z]+/([-a-z0-9]+)/$ http://localhost/story/$1/ [R=301]
Its purpose is to send requests for
And it works fine for that purpose, but the problem is that if I have a link to http://localhost/news/category/ that link is now broken, because it's also trying to do a redirect on that.
I've tested the above regex in several testing tools, and according to all of them, it should not be seeing news/category/ as a match, and yet on the server that's exactly what it seems to be doing. What can I do to fix this?