private String rewriteURL(String url) {
        String fromUrl = decodeURL(url);
        String toUrl = fromUrl.replaceFirst(this.fromRegularExpression, this.toReplacement);
        return encodeURL(toUrl);
    }
@param url the URL to rewrite
@return a rewritten URL
gateway/engine/policies/src/main/java/io/apiman/gateway/engine/policies/rewrite/URLRewritingStream.java