
Question:
First of all sorry for my English, hope you can undestand it.
I need to change the URL of the destination server with Lighttpd, I mean, someone is going to write an URL like <a href="http://my.proxy.server.com/MYQUERY" rel="nofollow">http://my.proxy.server.com/MYQUERY</a> and I need to change it to something like <a href="http://XXX.XXX.XXX.XXX/search?q=MYQUERY" rel="nofollow">http://XXX.XXX.XXX.XXX/search?q=MYQUERY</a>.
I tried to add an "querystring" option like the configuration below but it didn't work.
proxy.server = (
"" =>
(
( "host" => "XXX.XXX.XXX.XXX",
"port" => 80,
"querystring" => "/search?q=$HTTP[querystring]"
)
)
)
I also tried to force changing the URL with the code below but it didn't work neither.
$HTTP["url"] =~ "^/"{
server.querystring = "/search/q=$HTTP[querystring]"
}
What can I do? Does lighttpd have this feature?
thanks
Answer1:Found it. First of all I need to have the mod_rewrite activated, then before the proxy configuration I just need to rewrite the url, like:
url.rewrite-once = ( "/(.*)" => "/search?q=$1" )
Thank you all.