이것은 아마도 간단한 질문이지만 URL 재 작성 규칙에서 파일을 제외하고 싶습니다. 아래 코드는 내 web.config 파일의 재 작성 섹션입니다 (이 코드는 다른 사람이 제공 한 것입니다). demo-download.php라는 파일을 확장자가 제거 된 것으로부터 제외하고 싶습니다. (그것은 내가 $ _POST를 사용하는 PHP 코드에서 문제를 일으킨다.)URL 다시 쓰기 특정 URL 제외
<rewrite>
<rules>
<rule name="extensionless" stopProcessing="true">
<match url="(.*)\.php$" />
<action type="Redirect" url="{R:1}" redirectType="Permanent" />
</rule>
<rule name="removeextension" enabled="true">
<match url=".*" negate="false" />
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
<add input="{URL}" pattern="(.*)\.(.*)" negate="true" />
</conditions>
<action type="Rewrite" url="{R:0}.php" />
</rule>
</rules>
</rewrite>