Quantcast
Channel: URL Rewrite Module
Viewing all articles
Browse latest Browse all 2482

What determines the order of the execution of the rules

$
0
0

The application has the following Rewrite rules

<rules>
<rule name="no path" stopProcessing="true">
<match url="(.*)"/>
<conditions logicalGrouping="MatchAll" trackAllCaptures="false">
<add input="{URL}" pattern="^(/)?$"/>
</conditions>
<action type="Redirect" url="https://www.example.se/privat/"/>
</rule>

<rule name="missing trailing /privat" stopProcessing="true">
<match url="(.*)"/>
<conditions logicalGrouping="MatchAll" trackAllCaptures="false">
<add input="{REQUEST_URI}" pattern="^/privat$"/>
</conditions>
<action type="Redirect" url="https://www.example.se/privat/"/>
</rule>

<rule name="missing www" stopProcessing="true">
<match url="(.*)"/>
<conditions logicalGrouping="MatchAll" trackAllCaptures="false">
<add input="{HTTP_HOST}" pattern="^example.se$"/>
</conditions>
<action type="Redirect" url="https://www.example.se{REQUEST_URI}"/>
</rule>

<rule name="not https" stopProcessing="true">
<match url="(.*)"/>
<conditions logicalGrouping="MatchAll" trackAllCaptures="false">
<add input="{HTTPS}" pattern="^OFF$" />
</conditions>
<action type="Redirect" url="https://www.example.se{REQUEST_URI}"/>
</rule>
</rules>

However the order of the rules does not have any http to http redirect, still the following order is observed


301 http://example.se/ 
301 http://www.example.se/ 
200 https://www.example.se/privat/

Can anybody assist what determines the order of rules


Viewing all articles
Browse latest Browse all 2482

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>