Re: Outbound URL fixup rule

Splash Forums Rewrite Users Outbound URL fixup rule Re: Outbound URL fixup rule

#23460

Maybe this is not the best solution, have divided the problem in two rules.

– As have not found how to get the controller and the flow in the outbound rule, just do a partial fixup with:

config.defineRule()
.when(Direction.isOutbound().and(
URL.matches("{p}/WEB-INF/{s}execution{q}")
.where("p").matches(".*")
.where("s").matches(".*")
.where("q").matches(".*")))
.perform(Substitute.with("{p}/flow/{q}"));

This way I get an URL like http://server:port/app/flow/paramswhere “flow” is the constant I use for the next rule.

– And also adding an inbund rule to finish the job:

config.addRule(Join.path("/flow/{q}").to("/controller/flow?execution={q}").when(Direction.isInbound()));

Still trying to figure out how to access the “Referrer” header to extract controller and flow values.

The header referrer is in the “correct form”: http://server:port/app/controller/flow?execution=paramsso from there I could get the values to rebuild the URL.

Thanks,