@Override
public boolean evaluate(final Rewrite event, final EvaluationContext context)
{
if (event instanceof HttpInboundServletRewrite && rule.isInbound() && PFUtil.isRewritingEnabled(event))
{
HttpServletRewrite httpRewrite = (HttpServletRewrite) event;
String path = httpRewrite.getInboundAddress().getPath();
String url = URL.build(path).decode().toURL()
+ QueryString.build(httpRewrite.getInboundAddress().getQuery()).toQueryString();
String contextPath = httpRewrite.getContextPath();
if (!contextPath.equals("/") && url.startsWith(contextPath))
url = url.substring(contextPath.length());
if (rule.matches(url))
{