public static String getRewrittenRawPath(final ServerWebExchange exchange) {
        // match the new selector/rule of RewritePlugin
        ShenyuContext shenyuContext = exchange.getAttribute(Constants.CONTEXT);
        if (Objects.nonNull(shenyuContext)) {
            final String rewriteContextPath = exchange.getAttribute(Constants.REWRITE_CONTEXT_PATH);
            final String rewriteUri = exchange.getAttribute(Constants.REWRITE_URI);
            if (StringUtils.isNotBlank(rewriteContextPath) && StringUtils.isNotBlank(rewriteUri)) {
                return rewriteContextPath + rewriteUri;
            } else if (StringUtils.isNotBlank(rewriteContextPath)) {
                return rewriteContextPath + shenyuContext.getRealUrl();
            }
            final String contextPath = exchange.getAttribute(Constants.CONTEXT_PATH);
            if (StringUtils.isNotBlank(contextPath)) {
                return contextPath + shenyuContext.getRealUrl();
            }
        }
        return exchange.getRequest().getURI().getRawPath();
    }
Get the rewritten raw path.

@param exchange the exchange
@return the rewritten raw path
shenyu-plugin/shenyu-plugin-api/src/main/java/org/apache/shenyu/plugin/api/utils/RequestUrlUtils.java