Question : htaccces more then 10 variables

Hello,

I have more then 10 and it is resulting in $1+0 ie $1 = mesa+az and $10 = 44 the result is mesa+az0

Can you please help:

RewriteRule ^search/([a-zA-Z0-9-]+)/([a-zA-Z0-9-]+)/([0-9]+)-([0-9]+)/([0-9]+)-([0-9]+)/([a-zA-Z0-9-+]+)/([0-9]+)-([0-9]+)/([a-zA-Z0-9-+_]+)/([0-9]+) /results4.php?param=$1&task=$2&dollars0=$3&dollars1=$4&dollars0r=$5&dollars1r=$6&propertyType=$7&resultsPerPage=10&bedrooms=$8&bathrooms=$9&action=search&order=$10

Found this but I can not figure it out:
http://www.digimantra.com/tutorials/advanced-htaccess-for-more-than-10-group-of-backtrack-references/

Answer : htaccces more then 10 variables

Several options, but the simples is probably be to add a near identical RewritCond, to pick up the first 9 arguments, accessible via %1 through %9, in the subsequent ReqriteRule, then modify you Rewrite Rule to pick up the next 1 to 9 arguments, accessible via $1 to $9 e.g.


RewriteCond %{REQUEST_URI} ^search/([a-zA-Z0-9-]+)/([a-zA-Z0-9-]+)/([0-9]+)-([0-9]+)/([0-9]+)-([0-9]+)/([a-zA-Z0-9-+]+)/([0-9]+)-([0-9]+)/
RewriteRule ^search/[a-zA-Z0-9-]+/[a-zA-Z0-9-]+/[0-9]+-[0-9]+/[0-9]+-[0-9]+/[a-zA-Z0-9-+]+/[0-9]+-[0-9]+/([a-zA-Z0-9-+_]+)/([0-9]+)    /results4.php?param=%1&task=%2&dollars0=%3&dollars1=%4&dollars0r=%5&dollars1r=%6&propertyType=%7&resultsPerPage=10&bedrooms=%8&bathrooms=%9&action=search&order=$1

Alternatively you could have multiple ReqriteRule's, one each to set an environment variable, for each argument then  just have a RewriteRule to join the lot.
Random Solutions  
 
programming4us programming4us