Fixed server:
should not redirect to trailing "/" when the pathname is a dir