you should change this:
index-file.names = ( "index.php", "index.html",
"index.htm", "default.htm",
"lighttpd/index.html", "_h5ai/server/php/index.php" )
to that (adds a beginning slash):
index-file.names = ( "index.php", "index.html",
"index.htm", "default.htm",
"lighttpd/index.html", "/_h5ai/server/php/index.php" )
please try to add a line after this line in init.php
:
change this:
function normalize_path($path, $trailing_slash = false) {
$path = str_replace("\\", "/", $path);
return preg_match("#^(\w:)?/$#", $path) ? $path : (preg_replace('#/$#', '', $path) . ($trailing_slash ? "/" : ""));
}
to this:
function normalize_path($path, $trailing_slash = false) {
$path = str_replace("\\", "/", $path);
$path = preg_replace("#/+#", "/", $path);
return preg_match("#^(\w:)?/$#", $path) ? $path : (preg_replace('#/$#', '', $path) . ($trailing_slash ? "/" : ""));
}
as quick fix for your setup you can change the affected variable to a hardcoded value here:
define("APP_ABS_HREF", normalize_path(dirname(dirname(dirname(getenv("SCRIPT_NAME")))), true));
define("APP_ABS_HREF", normalize_path("/_h5ai/"), true));
Best Answer
What you are trying to do sounds wrong. The web-server does not handle the request urls that the browser sees. This is an application issue. Your web-application needs to present the urls in the form of
www.example.com/page
instead ofwww.example.com/page/
that it does now.If you do not want to change the application but still want this desired behaviour, you may want to consider using a filtering proxy in front of lighty and then filtering all the returned links.