fixes redirect in GET /:directory