Re: Path default add parameter to parameters

Splash Forums Rewrite Users Path default add parameter to parameters Re: Path default add parameter to parameters

#22936

In that case, you should build separate inbound and oubound rules for each URL, as I suggested, using the Path configuration:

.addRule()
.when(Direction.isInbound().and(Path.matches("/{0}")).and(loggedIn))
.perform(Forward.to("/test/login.xhtml"))

.addRule()
.when(Direction.isInbound().and(Path.matches("/{0}")).andNot(loggedIn))
.perform(Forward.to("/test/test.xhtml"))

.addRule()
.when(Direction.isOutbound().and(Path.matches("/test/{*}.xhtml").where("*").matches(".*")))
.perform(Substitute.with("/test"))

You can build any kind of custom rules you want – you just need to know what you want :)

~Lincoln