Reply To: How to append Trailing Slash to the requested URL

Splash Forums Rewrite Users How to append Trailing Slash to the requested URL Reply To: How to append Trailing Slash to the requested URL

#25662

hcubyc
Participant

@up
I’m pretty sure that what he wanted to achieve is to avoid double Join URLs, e.g.
he wants (I want that as well) that
.addRule(Join.path("/web/home/").to("/faces/portal/home.xhtml"))
will both work with /web/home and /web/home/ so he won’t have to do that:

.addRule(Join.path("/web/home/").to("/faces/portal/home.xhtml"))
.addRule(Join.path("/web/home").to("/faces/portal/home.xhtml"))