Proper 404 for dirs too
This commit is contained in:
parent
6e66e649b1
commit
1f8874c269
1 changed files with 6 additions and 2 deletions
|
|
@ -170,8 +170,12 @@ if(! ~ $#args 0)
|
||||||
if(~ $req_path */index)
|
if(~ $req_path */index)
|
||||||
perm_redirect `{echo $req_path | sed 's,/index$,/,'}
|
perm_redirect `{echo $req_path | sed 's,/index$,/,'}
|
||||||
|
|
||||||
if(~ $local_path */)
|
if(~ $local_path */) {
|
||||||
local_path=$local_path^'index'
|
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)
|
if not if(test -d $local_path)
|
||||||
perm_redirect $req_path^'/'
|
perm_redirect $req_path^'/'
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue