Trim slashes from request uri before redirecting (#1001)