views:

398

answers:

1

hi,

i'm using the 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 ist that i've no idee at the momant how to rewrite outbound links in my facelets. i read the paragraph about outbound-rule in the in the manuel (http://tuckey.org/urlrewrite/manual/3.0/). 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?

A: 

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 \?)

victor hugo