Re: [users@httpd] Mod_rewrite and default document

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Erik Funkenbusch wrote:
# 1 rewrite /?id=123 as index.php?id=123 - Does not work

It is intended *not* to match in this case - and if you are using numerical values, why are you using the regEx .* which matches too much, your second rule will never work, because the first one will match once the filepath contains 1 or n chars.

RewriteEngine on
RewriteRule ^([0-9]+)$ /index.php?id=$1 [L]
# 2 rewrite /123/blah as index.php?id=123&blah
RewriteRule ^([0-9]+)/(.+)$ /index.php?id=$1&$2 [L]


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
  "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux