« Previous Next »

Thread: L flag not being imported from mod_rewrite

Last post 06-11-2008 8:19 PM by ruslany. 3 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (4 items)

Sort Posts:

  • 06-11-2008, 5:55 PM

    • Jason Hill
    • Top 200 Contributor
    • Joined on 04-23-2006, 3:39 AM
    • Sydney, Australia
    • Posts 26

    L flag not being imported from mod_rewrite

    Hi,

    We are currently using ISAPI_Rewrite which uses the same syntax as mod_rewrite so I was delighted to see an import tool. Very nice work.

    It worked really well except that the L flag didn't get imported. Has this been fixed?

    Jason

  • 06-11-2008, 7:37 PM In reply to

    • ruslany
    • Top 25 Contributor
    • Joined on 07-01-2007, 3:38 PM
    • Redmond, WA
    • Posts 664

    Re: L flag not being imported from mod_rewrite

    The "L" flag stands for "Last rule", meaning that if this rule was evaluated successfully then no subsequent rules will be evaluated. In URL rewrite module we have a rule attribute called "stopProcessing", which has the same semantics as L flag in mod_rewrite. The rule converter should set this flag to true when converting any mod_rewrite rules that use "L" flag. If that is not the case for you - could you post your rule here?

     Also, the rule import tool understands only mod_rewrite syntax. ISAPI_Rewrite syntax, while similar to mod_rewrite, has some unique flags and attributes, so the tool will not be convert ISAPI_Rewrite rules reliably.

    http://ruslany.net
  • 06-11-2008, 8:09 PM In reply to

    • Jason Hill
    • Top 200 Contributor
    • Joined on 04-23-2006, 3:39 AM
    • Sydney, Australia
    • Posts 26

    Re: L flag not being imported from mod_rewrite

    Sure...I understand what L stands for and how that is supposed to map to the new syntax. I have L flags in all of my rewrite rules and the stopProcessing flag was not brought across for any of them when I used the import, e.g.

    RewriteRule ^(images|css|js|htmleditor|supplier|video|webservices|wo)/ - [NC,L]

    resulted in:

    <rule name="Rule001">
       <match url="^(images|css|js|htmleditor|supplier|video|webservices|wo)/" />
       <action type="None" />
    </rule>

    The interesting thing is that the preview in the UI showed the XML *with* the stopProcessing attribute present but it does not get applied to the actual XML in the config file.

    We are only using basic funtionality from ISAPI_Rewrite with standard mod_rewrite flags so it should be OK.

  • 06-11-2008, 8:19 PM In reply to

    • ruslany
    • Top 25 Contributor
    • Joined on 07-01-2007, 3:38 PM
    • Redmond, WA
    • Posts 664

    Re: L flag not being imported from mod_rewrite

    Looks like this is a bug in the rule import tool. Thanks for reporting this - good catch!

    http://ruslany.net
Page 1 of 1 (4 items)
Microsoft Communities