This content has been marked as final.
Show 2 replies
-
1. Re: URLRewrite & redirect issue
norman Oct 14, 2008 12:37 AM (in response to stephanos)What are your rewrite patterns and what URL are you getting that isn't being rewritten?
-
2. Re: URLRewrite & redirect issue
stephanos Oct 14, 2008 7:10 AM (in response to stephanos)Well the relevant patterns are these (since this is about outgoing URLs only those are printed):
<!-- direct access --> <outbound-rule> <from>^/(\w*).seam\?lang=(\w\w)&ctry=(\w\w)$</from> <to last="true">%{context-path}/%{session-attribute:language}/%{session-attribute:country}/$1</to> </outbound-rule> <outbound-rule> <from>^/(\w*).seam\?lang=(\w\w)&ctry=(\w\w)&(.*)$</from> <to last="true">%{context-path}/%{session-attribute:language}/%{session-attribute:country}/$1?$4</to> </outbound-rule> <outbound-rule> <from>^/(\w*).seam$</from> <to last="true">%{context-path}/%{session-attribute:language}/%{session-attribute:country}/$1</to> </outbound-rule> <outbound-rule> <from>^/(\w*).seam\?(.*)$</from> <to last="true">%{context-path}/%{session-attribute:language}/%{session-attribute:country}/$1?$2</to> </outbound-rule>
which works on every h:outputLink request, like the following.
<a jsfc="h:outputLink" id="homeLink" value="/home.seam"> <span>Home</span> </a>
I also tested this successfully with TestNG.
However, despite the test results, after redirecting in pages.xml with
<redirect view-id="/home.xhtml" />
the following URL appears:
/home.seam?lang=de&ctry=de
So it seems to me that URL rewriting is not applied when redirecting, which seems odd.