URL rewriting does not work as it theoretically should
in my setup.
You are using "-" as literal character in many default patterns
for the Mod_Rewrite RewriteRules for Apache.
However, that syntax to escape "-" has been introduced with
Regular Expressions Version 8
(according to PERL documentation, the mother for pattern
matching syntax.)
It seems that older versions of Apache don't use Version 8 for
pattern matching, meaning the "-" introduces a range. There might
be a dependence on Locale settings too. (don't know. It doesn't matter.)
All you need to do in order to achieve full backward compatibility is
to use the "older" syntax for that case.
Meaning, putting the "-" in the first or last position of the character
classes. Code readability does not suffer from that change.
I know you guys are very concerned about maintaining backward
compatibility. That change can be done in a couple of minutes.
Code: Select all
Please, replace all instances of:
[0-9a-z\.\_!;,\-\%\+]
in the mod_rewrite / .htaccess default settings with:
[-0-9a-z\.\_!;,\%\+] or [0-9a-z\.\_!;,\%\+-]
I'd appreciate it very much.
This drove me crazy, since I have the latest Apache server
on my development machine at home, but still a 1.3 at
one of my webhosts. Couldn't figure out what's going on for a while
Hope it pays off for everyone else having troubles.