Re: Mod RewriteRule Help : Accepting Variable Number Of Arguments

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

 



On 3/31/07, Kristopher Yates <kris_yates64@xxxxxxxxxxx> wrote:
Hi Dragon,
RewriteRule ^(.*)/(.*)/(.*)/(.*)/(.*)/?$
/index.php?section=$1&page=$2&mode=$3&item=$4&action=$5 [L]

Parsing http://domain.com/section/page/mode/item/action/

Results:
_REQUEST[section] = "section/page"
_REQUEST[page] = "mode"
_REQUEST[item] = "action"
_REQUEST[action] = empty

All the asterisks are greedy, and the one you expect to be 'action'
doesn't have anything left to match but the forward slash but the 0
characters after the slash following "action".  Try making the
previous expressions non greedy, and maybe use + instead of *

--
Eric Covener
covener@xxxxxxxxx

---------------------------------------------------------------------
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