Forum Moderators: phranque
I have 6 "properties" for my widgets that I want users to be able to narrow down by: company, price range, type, free shipping, rebates, (and one other for the ORDER BY part).
I want the user to be able to select any combination of these to narrow it down, so I had this:
RewriteRule ^sub/((.+)-c/)?((.+)-t/)?((.+)-p/)?((.+)-r/)?((.+)-f/)?((.+)-o/)? subindex.php?company=$2&type=$4&price=$6&rebates=$8&freeshipping=$10&order=$12 [L]
But of course you can't have over $9, so the easiest way would be to make the container groups: (..-c/) non-backreferencing so I would only have $1 - $6, but as we've established, that doesn't work.
So now I'm trying to figure out the whole $9 [QSA] stuff, unless you see a better way?
Thanks so far
RewriteRule /([^/\-]+)-c/ - [E=company:$1]
RewriteRule /([^/\-]+)-t/ - [E=type:$1]
RewriteRule /([^/\-]+)-p/ - [E=price:$1]
RewriteRule /([^/\-]+)-r/ - [E=rebates:$1]
RewriteRule /([^/\-]+)-f/ - [E=freeship:$1]
RewriteRule /([^/\-]+)-o/ - [E=order:$1]
RewriteRule /sub/.+ subindex.php?company=%{ENV:company}&type=%{ENV:type}&price=%{ENV:price}&rebates=%{ENV:rebates}&freeshipping=%{ENV:freeship}&order=%{ENV:order} [L]