您的位置:首页 > 移动开发

why tuckey UrlRewriteFilter outbound-rule mapping did not work?

2016-09-07 00:00 841 查看
1down votefavorite
I'm using urlrewritefilter to pretty up my product links for a better google indexing (removing product parameter).
example:
.../product/snowboarda
is transferred via url rewriting rule to
.../product.seam?product=snowboarda
rewriting rule
<rule>
<from>^/product/([a-zA-Z]+)$</from>
<to>/product.seam?product=$1</to>
</rule>
But my problem is that I've no idea at the moment how to rewrite outbound links in my facelets. I read the paragraph about outbound-rule in the in the manual. Now I'm wondering how I can use this together with
s:link
? what about form submits or redirects (action outcome null)? please help to sort things out :)
possible rewriting outbound rule (?)
<outbound-rule>
<from>^/product.seam?product=([a-zA-Z]+)$</from>
<to>/product/$1</to>
</outbound-rule>
any hints/ideas?
java url-rewriting seam tuckey-urlrewrite-filter

shareimprove this question
edited Mar 25 '12 at 10:18



Sean Patrick Floyd 166k30306434
asked Mar 1 '10 at 6:59



kiyaser 613
add a comment

2 Answers

activeoldestvotes

up vote1down vote
I had the same problem and solved it removing the caret at the beginning
<outbound-rule>
<from>/product.seam?product=([a-zA-Z]+)$</from>
<to>/product/$1</to>
</outbound-rule>
(Also, I'm not sure if you should try escaping the question mark symbol with
\?
)

shareimprove this answer
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: