I want to rewrite my urls like this:
/admin/
-> /admin/admin.xhtml
I wrote this code:
return ConfigurationBuilder.begin()
.addRule(TrailingSlash.append())
.when(Path.matches("/{page}"))
.perform(Forward.to("/{page}/{page}.xhtml"))
but with this configuration I got this exception:
org.ocpsoft.rewrite.exception.ParameterizationException:
Must supply [2] values to build output string.
How can i use one variable from "when", twice in "perform"?