I’ve been trying to implement rewrite with Deltaspike but it’s only working on inbound url’s.
In my access.log I’m trying to access the url ‘/ds/about’ which then does a redirect to ‘/ds/about.xhtml’ to the url in the address bar is always changes to the .xhtml version.
After experimenting I’ve found that this is only an issue on an initial GET request when a redirect is issued to put the ‘dswid’ parameter on the url. Disabling the multi-window handling (http://deltaspike.apache.org/documentation/jsf.html#_switch_mode) prevents the redirect and url rewrite works fine after this. Any ideas how to get url rewriting working without disabling multi-window handling?
I guess DeltaSpike isn’t calling HttpServletResponse.encodeURL() on the target URL before sending the redirect. That is the hook used by Rewrite to perform outbound rewriting. So this is something that should be fixed in DeltaSpike. As I’m on the DeltaSpike team, I’ll have a look at this early next week.