I have an .htaccess file that's using several rewrite rules. They don't seem to be working on a server I'm testing on, but they work on another server. I tested using a rule that doesn't use a regex, and that seems to work. Is there any way that regex rules can be disabled (or enabled) in Apache?
+4
A:
No, regular expressions are fundamental for mod_rewrite. But it might be possible that your servers have different versions and don’t use the same regular expression engine (POSIX ERE since 1.2, PCRE since 2.0).
Gumbo
2009-09-15 07:16:53
What's a quick and easy way to determine which engine the server is using?
Calvin L
2009-09-15 15:58:38
@Calvin L: My post is a little ambiguous. mod_rewrite supports only one regular expression engine. The version of Apache tells you what engine is used.
Gumbo
2009-09-15 18:13:39
Thanks Gumbo, turns out the live server is on Apache 1.3.41, and my local server is on 2.2.11. Oy! Thank you so much, that really helped.
Calvin L
2009-09-16 04:57:05