What the title says..
www.example.com is defined in lighttpd.conf as a virtual host:
$HTTP["host"] =~ "(^|\.)example.com$" {
server.document-root = "/usr/www/example.com/http"
accesslog.filename = "/var/log/www/example.com/access.log"
$HTTP["url"] =~ ".pl$" {
cgi.assign = (".pl" => "/usr/bin/perl" )
}
}
However, instead of going by the files listed in index-file.names (the usual index.html, default.html, etc), i want all requests to the root of the virtual host to be forwarded to /cgi-bin/index.pl. What's the easiest/best way of doing this? This need is a special case, and will only apply to this virtualhost. Is it possible to have that particular virtualhost send a redirect in the header?
If you want to send an HTTP redirect:
If you want an internal rewrite: