Is it possible to redirect/change the url in the address bar of the browser? I want that if the user type ” /Recommended.xhtml?recd=teste ” on the address bar it got redirected to ” /recommended/teste “. I want only ” /recommended/teste ” to be visible on the address bar of the browser even if the user directly input ” /Recommended.xhtml?recd=teste “. The code below is working but it doesn’t change the link in the address bar.
You can use .withInboundCorrection() on a Join for this.
Also note that should not use query parameters in the .to() part of your rule. Path parameters are automatically transformed in a query parameter with the name of the parameter. So the rule should look like this: