2 Replies Latest reply on Jul 1, 2008 4:18 PM by norman

    URLRewriting and Page flow problems.

    meetoblivion

      So I just noticed the following odd behavior in my app.


      I am using urlrewrite 2.6 and facelets, with page navigation managed by pages.xml


      I have the following rewrite rule, to access my /user/login.xhtml as /Login.



          <rule enabled="true">
               <from>^/Login$</from>
               <to>/user/login.page</to>
          </rule>



      This works fine, I'm able to access /app/Login and it shows the login form.  I am able to successfully login on this page, but my redirect rule isn't working, as defined in pages.xml



          <page view-id="/user/login.xhtml">
              <navigation from-action="#{identity.login}">
                 <rule if="#{identity.loggedIn}">
                    <redirect view-id="/home.xhtml"/>
                 </rule>
              </navigation>
          </page>



      It all works perfectly fine, if I access it without the rewrite rule, ie /app/user/login.page redirects to /home.page when I login, exactly as i would hope, but I don't understand why it's not working w/ the rewrite enabled.  I believe I can circumvent it by changing the to in my rewrite to <to redirect="true">, but I'd rather not.  Anyone have any idea?


      Thanks,


      John


      (PS- sorry for the multi post, but I was just thinking about this stuff).