Base the redirect on the request path, not document path