I would like to use Lighttpd to rewrite and proxy as in this example:


1) There is no http://www.domain.com/download on server.
2) http://www.domain.com/download => proxy => Apache 2.2 on same server to http://www.domain.com/download.php5
3) *.php should be handled by Lighttpd, however, the reason I want *.php5 to be done by Apache is due to compatibility issues.

proxy.server = ( ".php5" =>
( "localhost" =>
(
"host" => "XXX.XXX.XXX.XXX",
"port" => 81
)
)
)


The reason is because I don't want people to see .php5 file

Does this work using url.rewrite? If so how to do it?

I already have the following in lighttpd.conf, should the url.rewrite be placed in side of this?

$HTTP["host"] =~ "^domain\.com$" {
url.redirect = ( "^/(.*)" => "http://www.domain.com/$1" )
}