- don't cut single slash if diroptions path is equal to the docroot

This commit is contained in:
Michael Kaufmann (d00p)
2010-07-22 06:36:24 +00:00
parent d1d772f790
commit 9191bc6c08

View File

@@ -522,7 +522,9 @@ class lighttpd
mkDirWithCorrectOwnership($domain['documentroot'], $row['path'], $domain['guid'], $domain['guid']);
// We need to remove the last slash, otherwise the regex wouldn't work
$path = substr($path, 0, -1);
if($row['path'] != $domain['documentroot']) {
$path = substr($path, 0, -1);
}
$path_options.= ' $HTTP["url"] =~ "^' . $path . '($|/)" {' . "\n";
$path_options.= "\t" . 'dir-listing.activate = "enable"' . "\n";
$path_options.= ' }' . "\n\n";
@@ -539,7 +541,9 @@ class lighttpd
mkDirWithCorrectOwnership($domain['documentroot'], $row['path'], $domain['guid'], $domain['guid']);
// We need to remove the last slash, otherwise the regex wouldn't work
$path = substr($path, 0, -1);
if($row['path'] != $domain['documentroot']) {
$path = substr($path, 0, -1);
}
$path_options.= ' $HTTP["url"] =~ "^' . $path . '($|/)" {' . "\n";
$path_options.= "\t" . 'cgi.assign = (' . "\n";
$path_options.= "\t\t" . '".pl" => "/usr/bin/perl",' . "\n";