httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eric Covener" <cove...@gmail.com>
Subject Re: [users@httpd] Mod RewriteRule Help : Accepting Variable Number Of Arguments
Date Sun, 01 Apr 2007 02:16:09 GMT
On 3/31/07, Kristopher Yates <kris_yates64@hotmail.com> 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@gmail.com

---------------------------------------------------------------------
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@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message