J'ai a URL Rewrite setup for clean URLs in a CMS et mon web.config looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="Clean URLs" stopProcessing="true">
<match url="^([^/]+)/?$" />
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="?id={R:1}" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
It basically turns index.php?id=something into something for clean URLs. Very simple et it works well.
As is common in CMSs, to prevent le back-end depuis breaking, chaque subdirectory requires soit <remove name="Clean URLs" /> ou <clear /> in its web.config so le rule n'est pas inherited.
Is there a way of specifying in le parent rule that it ne devrait pas be inherited by its children at tous by somehow limiting le rule's scope to seulement le current directory? Something like <rule name="Clean URLs" stopProcessing="true" inherit="no"> would be epic.