Reply To: Join replaced by isInbound isOutbound not working

Splash Forums Rewrite Users Join replaced by isInbound isOutbound not working Reply To: Join replaced by isInbound isOutbound not working

#26472
.addRule()
.when(Direction.isOutbound().and(Path.matches("/artist-albums.xhtml")).and(Query.parameterExists("artistUrl")))
.perform(Substitute.with("/{artistUrl}"))
.where("artistUrl").matches("[a-z0-9-]+"))

Try the above. The point is that {artistUrl} needs a value, and if that value does not come from a previously matched {variable} binding in a condition in the .when() or .perform() clauses, then rewrite won’t know what to put there. It can’t automatically figure out where you want that value to come from if you haven’t already defined a parameter with that name. Now that I know what you want to do, I think the above should work, but note, this assumes you are attempting to rewrite an outbound URL of the following form:

/artist-albums.xhtml?artistUrl=URL

Sorry for not picking up on what you wanted to do sooner. Let me know if I misunderstood.