Restrict some url pattern in a apache redirect
问题 I am writing a redirect to match any url of the patter /message/* here. RewriteRule ^/message/(.+)$ http://abet.in/message/$1 [NC,R=301,L] Now I want to modify it by not allowing some string pattern in url. RewriteCond to check /message/index.html in the url. 1. Check if the request url contains /message/index.html. 2. If the condition is not met then do a redirect. I tried the following methods. But I am not sure whether they are correct or not. RewriteCond %{THE_REQUEST} !^/message/index