httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brent 'Dax' Royal-Gordon <>
Subject Re: [users@httpd] mod_rewrite for one parameter
Date Sat, 14 Aug 2004 16:19:45 GMT
On Sat, 14 Aug 2004 13:48:05 +0300, Cristian Bichis
<> wrote:

>         #RewriteRule ^(.*)$ rule.php?page=$1
>         RewriteRule ^(.*)/(.*)$ rule.php?lang=$1&page=$2
>         RewriteRule ^(.*)/(.*)/(.*)$ rule.php?lang=$1&page=$2&subpage=$3

The problem is that "." matches any character, *including* slash. 
Replace all the dots (except for the one in "rule.php", of course)
with "[^/]" and you should have much more success.  Alternately,
reversing the order of the rules (so the rules with more slashes have
a chance to match first) could help, but that's prone to error.

Brent 'Dax' Royal-Gordon <>
Perl and Parrot hacker

There is no cabal.

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message