tags:

views:

20

answers:

1

I have the following querry:

update234ae5.php?q=1&q=2....

must be rewriten to:

update.php?cond=234ae5&q=1&q=2....

I use:
"^/update(([a-zA-Z0-9]+))" => "/update.php?cond=$1"

How can i add the rest of url string, becouse my url it's rewritten to
update.php?cond=234ae5& without the rest of params

In apache i use
RewriteCond %{QUERY_STRING} (.*)
RewriteRule ^/update([0-9a-z]+).php /update.php?cond=$1&%1

A: 

As the lighttpd documentation states:

If you wanna pass the Query String (?foo=bar) to the rewrite destination you have to explicitly match it:

So you'll want something like:

"^/update([a-zA-Z0-9]+)\.php(\?(.+))?" => "/update.php?cond=$1&$3"
Conspicuous Compiler
It's not working.. results it's same
cris
Forgot to include the ".php" part in the match. Edited post to correct.
Conspicuous Compiler
Excellent.. It's working..Thank you
cris