I'm tired of getting the whole line before the first slash, when the URL ends with the words "word1" or "word2" and im uses this code:
RewriteRule ^(.+)/word1|word2/?$ index.php?query=$1 [NC]
I have no problem with a URL that has "word1" at its ends, but if the URL ends with "word2", the Apache dose does not return any value for the variable "query"
source share