我正在尝试从基于窗口的托管中隐藏 .php 扩展名。
我正在尝试使用 web.config
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rule name="hide .php extension" 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="{R:1}.php" />
</rule>
</rewrite>
</system.webServer>
</configuration>
它显示404错误,请提出问题所在。
谢谢你。