Re: 404 rewrite handler for images

Splash Forums Rewrite Users 404 rewrite handler for images Re: 404 rewrite handler for images

#22570

Actually I’m note sure if it is possible to access values from the EvaluationContext in such a way.

But you could simply implement the perform step yourself in a few lines of code.

Something like this:

.perform(new HttpOperation() {
@Override
public void performHttp(HttpServletRewrite event, EvaluationContext context)
{
HttpInboundServletRewrite inboundEvent = (HttpInboundServletRewrite) event;
inboundEvent.redirectTemporary("http://placehold.it/128&text=" + event.getRequestQueryString());
}
});

@lincoln: Or what is the common way to do something like this?