Fixed wrong redirect url if path contains some query parameters