Here you go: RewriteRule ^/seach/(.*) /myscript.php/$1 RewriteRule ^/myscript.php/([a-z])([0-9]+)/(.*) /myscript.php/$3?param_$1=$2 [QSA,N] RewriteRule ^/myscript.php/([a-z])([0-9]+)$ /myscript.php?param_$1=$2 [QSA,L] -ascs -----Original Message----- From: news [mailto:news@xxxxxxxxxxxxx] On Behalf Of Gioele Barabucci Sent: Friday, June 16, 2006 2:57 PM To: users@xxxxxxxxxxxxxxxx Subject: [users@httpd] mod_rewrite and multiple parameters Hi, I use mod_rewrite to map URLs like this http://mydomain/seach/a10/b30/c9/f99 to myscript.php?param_a=10¶m_b=30¶m_c_new=9¶m_f=99. Everithing works fine but, as the number of (optional) parameters increase, I need to create too many RewriteRules. My RewriteRules are like this RewriteRule ^a([0-9]*)$ myscript.php?param_a=$1 RewriteRule ^b([0-9]*)$ myscript.php?param_b=$1 ... RewriteRule ^f([0-9]*)$ myscript.php?param_f=$1 RewriteRule ^a([0-9]*)/b([0-9]*)$ myscript.php?param_a=$1¶m_b=$2 RewriteRule ^a([0-9]*)/c([0-9]*)$ myscript.php?param_a=$1¶m_c=$2 ... RewriteRule ^a([0-9]*)/f([0-9]*)$ myscript.php?param_a=$1¶m_f=$2 RewriteRule ^b([0-9]*)/c([0-9]*)$ myscript.php?param_b=$1¶m_c=$2 ... RewriteRule ^e([0-9]*)/f([0-9]*)$ myscript.php?param_e=$1¶m_f=$2 RewriteRule ^a([0-9]*)/b([0-9]*)/c([0-9])$ myscript.php?param_a=... and so on. Is there a way to say * let's start with url = 'myscript.php?' * if a([0-9]*) matches; url += param_a=$1 * if b([0-9]*) matches; url += param_b=$1 * if c([0-9]*) matches, url += param_c=$1 ... * at the end connect to url. -- Gioele <dev@xxxxxxxxxxxxxxxxxxx> --------------------------------------------------------------------- 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 --------------------------------------------------------------------- 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