views:

6

answers:

1

greetings all i have some rules which are very similar

    <rule>
    <from>/a/**/b/**/c/**/d</from>
    <to>/somePlace</to>
</rule>

    <rule>
    <from>/a/**/b/**/c</from>
    <to>/anotherPlace1</to>
</rule>

    <rule>
    <from>/a/**/b</from>
    <to>/anotherPlace2</to>
</rule>

and i want when an exact match occurs for the first rule, it's only executed and the other rules are not, like break in programming, any ideas how to do so ?

A: 

the rules are executed in order - if it matches the first rule it will execute it, if it doesnt it will go to the next and so on

therefore you need to order your rules by priority and that should help

paul

PaulStack
so you are saying in the current order, if i i write something that matches the first rule, only the first rule will be executed ?
sword101
im not sure if you are using IIS rewrite, mod_rewrite for php, .htaccess file or a 3rd part but when a rule is found as it works its way down then list then it will be executed, there is a way to stop other rules being executed with certain engines but im not sure if you have this rule switched on or not
PaulStack
i am using tuckey if you are familiar with it
sword101
im not familiar with that engine im afraid - but i have found this info sheet on it - http://www.tuckey.org/urlrewrite/manual/3.0/ - there is some things in the <class-rule> about how if not specified each rule will be fired in turn to try and find a best match scenario - so there is some useful information here to use - i hope its of some use :(
PaulStack