2

Problem is to escape query string in Lighttpd:

This is url:

domain/publisher/adframe-34.html?tag=xzzx&gg=yy&uu=121

and this is lighty rule:

adframe-([1-9][0-9]*)\.html\?(.*)" => "ad/frame.php?ad_unit_id=$1&addl=$2

What I am expecting is that addl contains : tag=xzzx&gg=yy&uu=121 but I have this as response:

[ad_unit_id] => 34
[addl] => tag=xzzx
[gg] => yy
[uu] => 121

Is there some way to force Lighttpd to pass all in one param from query string, and to do that just with lighttp rule, without to parse [REQUEST_URI] from server?

j0k
  • 401
  • 9
  • 16

1 Answers1

1

This rewrite rule:

url.rewrite-once = (
 "^.*/adframe-([1-9][0-9]*)\.html(\?(.*))?$" => "/ad/frame.php?ad_unit_id=$1&$3"
)

will rewrite request /smth/here/adframe-3487.html?tag=zyx&gg=yy&uu=121 to /ad/frame.php?ad_unit_id=3487&tag=zyx&gg=yy&uu=121.

Will it resolve your problem?

Max Kochubey
  • 1,191
  • 6
  • 8
  • I think OP wants `addl` contains every thing **escaped** from the url. Like `ad/frame.php?ad_unit_id= 34&addl=tag%3Dxzzx%26gg%3Dyy%26uu%3D121` You see? With all the query string encoded. – j0k Dec 29 '12 at 13:22