2 Replies Latest reply on Dec 8, 2009 1:27 PM by guy bashan

    Rewrite problem

    guy bashan Apprentice

      Hi,


      I am trying to implement url rewrite and having some problems. This is my pages definition:



        <page view-id="/home.xhtml" login-required="true">
          <rewrite pattern="/home/{filter}/{page}"/>
          <rewrite pattern="/home/{filter}"/>
          <rewrite pattern="/home"/>
          <param name="filter" required="false" />
          <param name="page" required="false" />
        </page>



      I have links on the page:



       <ul id="subtabHome" class="sublinks" style="#{selectedTab == 'tabHome' ? '' : 'display:none;'}">
                <li><s:link value="All" view="/home.xhtml" propagation="none"</s:link></li>
                <li>|</li>
                <li><s:link value="Photos" view="/home.xhtml" propagation="none"><f:param name="filter" value="photos" /></s:link></li>
                <li>|</li>
                <li><s:link value="Comments" view="/home.xhtml" propagation="none"><f:param name="filter" value="comments"/></s:link></li>
              </ul>



      Pressing one of the links is working good. But after, for example, pressing on photos link, the home link (this is the first link in the list), become: home/photos, although I expect it to be: /home only. Is the a way solving this issue?


      Thanks.