fix path handling in router if REDIRECT_URL is not present