Proper 404 for dirs too

This commit is contained in:
uriel 2009-01-16 01:24:58 +01:00
parent 4eb1d92200
commit e4c517160f

View File

@ -170,8 +170,12 @@ if(! ~ $#args 0)
if(~ $req_path */index)
perm_redirect `{echo $req_path | sed 's,/index$,/,'}
if(~ $local_path */)
local_path=$local_path^'index'
if(~ $local_path */) {
if(test -d $local_path)
local_path=$local_path^'index'
if not
perm_redirect `{echo $req_path|sed 's,/+$,,'}
}
if not if(test -d $local_path)
perm_redirect $req_path^'/'