What's the difference in mod_rewrite between Apache 1.3(.37) and a pair of.2(.11)?

RewriteEngine On

RewriteCond %{SCRIPT_FILENAME} !-d
RewriteCond %{SCRIPT_FILENAME} !-f

RewriteRule ^pages/edit(account|page)/([0-9]+)*$ ./index.php?p=edit$1&id=$2
RewriteRule ^pages/([\w'-]+)*$ ./index.php?p=$1

I authored this also it "creates my machine" that is running Apache 2.2.11 however the production server that it must operate on is Apache 1.3.37. I'm really a new comer to mod rewrite and merely began learning regex today. where will i move from here?

update: I installed Apache 1.3.37 on my small local machine. I get the mistake "Invalid command 'RewriteEngine', possibly mis-typed or based on a module not incorporated within the server configuration".

update 2: I fixed the issue i'd with my local machine. now i'm obtaining the same problem as around the production server.

Apache 1.x uses POSIX Extended Regular Expressions and individuals don’t understand shorthand character classes like \w. So do this:

RewriteRule ^pages/edit(account|page)/([0-9]+)$ ./index.php?p=edit$1&id=$2
RewriteRule ^pages/([A-Za-z0-9_'-]+)$ ./index.php?p=$1

I believed it. Just the last rule was the issue. note the [^w] rather than [w'-].

RewriteRule ^pages/([^\w]+)*$ ./index.php?p=$1

This works together with Apache 1.3.37 but no more functions in Apache 2.2.11. if anybody knows a method to get this operate in both I actually want to appreciate this rather than just which makes it work.

Try changing this:


with this particular:


In certain RegEx parsers, if you would like - inside a character set, it must be the very first character, as it features a special meaning in character sets.