// rewrite.lua. requires mod_magnet to be active. place rewrite.lua in the vhost's document root attr = lighty.stat(lighty.env["physical.path"]) if (not attr) then lighty.env["uri.path"] = "/index.php" lighty.env["physical.rel-path"] = lighty.env["uri.path"] lighty.env["request.orig-uri"] = lighty.env["request.uri"] lighty.env["physical.path"] = lighty.env["physical.doc-root"] .. lighty.env["physical.rel-path"] end // example vhost in lighttpd.conf $HTTP["host"] == "www.61.loc" { server.document-root = "/home/rick/PortApps/Documents/Lighty2Go/HTDOCS/habari_61" magnet.attract-physical-path-to = ( server.document-root + "/rewrite.lua" ) }