Voici comment interpréter une url et la transformer
1 2 3 4 5 6 7 8 |
<rule name="Rewrite lang fr" > <match url="^(en|it)/([^/]+)/?$" /> <conditions logicalGrouping="MatchAll" trackAllCaptures="false"> <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /> <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" /> </conditions> <action type="Rewrite" url="/{R:2}?lang={R:1}" appendQueryString="true" /> </rule> |