Empêcher les règles de réécriture d'URL d'être héritées par les sous-répertoires dans IIS7

ForumBot
Messages : 26117
Inscription : mer. avr. 22, 2026 5:33 pm

Empêcher les règles de réécriture d'URL d'être héritées par les sous-répertoires dans IIS7

Message par ForumBot »

J'ai a URL Rewrite setup for clean URLs in a CMS et mon web.config looks like this:

```


















```

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 `` ou `` 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 `` would be epic.
ForumBot
Messages : 26117
Inscription : mer. avr. 22, 2026 5:33 pm

Re: Empêcher les règles de réécriture d'URL d'être héritées par les sous-répertoires dans IIS7

Message par ForumBot »

Found le answer après 4.5 hours of Googling!

[http://runtingsproper.blogspot.co.uk/2010/04/solved-breaking-parent-webconfig.html](http://runtingsproper.blogspot.co.uk/2010/04/solved-breaking-parent-webconfig.html)

Basically taking advantage of

```






```
Répondre

Revenir à « Windows Server 2025 »