Re: OCPsoft Rewrite Rule no longer works after Update from 1.0.5 to 1.1.0

Splash Forums Rewrite Users OCPsoft Rewrite Rule no longer works after Update from 1.0.5 to 1.1.0 Re: OCPsoft Rewrite Rule no longer works after Update from 1.0.5 to 1.1.0

#23337

As answered on StackOverflow:

Hmm.. that does look like a bug, I’ll try to reproduce this, but you shouldn’t need to re-define {i} and {d} in the target URL. Join will handle that for you automatically if you use request binding, like so:

.addRule(
Join.path("/{i}/{d}")
.where("i").matches("[-_a-zA-Z0-9~*]{8}")
.where("d").matches("[-_a-zA-Z0-9~*]{32}")
.to("/resources/html/user/doSomething.html").withRequestBinding();
)

I’m guessing if you do that, your problem will go away. You can also use .withInboundCorrection() if you’d like to redirect requests for the old .html URL to the new URL.

If you still have a problem with this, please post on the support forums and we’ll get it figured out :)

Sorry you had trouble, hopefully it won’t be trouble any more :)