Put this in front of your cath all rule.
RewriteCond %{ENV:REDIRECT_STATUS} !=200
The problem is that after processing the [L] flag, all of the following RewriteRules are really ignored, however, the file is processed from the beginning, now with a new URL.
This magic condition will not handle catch all if the file is already redirected.
PS: If this does not work, you may need to adjust the condition a little: 200 !=200 , ^. , ^$ .
Obviously, the variable gets a value of 200 for redirection, but other pages (error, etc.) set it for some value. Now this means that you are either checking if it is empty , is not empty , is 200 or is not 200 , depending on what you need.
Qwerty May 25 '14 at 12:07 a.m. 2014-05-25 00:07
source share