Windows Web.config重定向到另一个URL,但不带尾随斜杠

Windows Web.config重定向到另一个URL,但不带尾随斜杠,windows,iis,iis-7,web-config,windows-server-2008,Windows,Iis,Iis 7,Web Config,Windows Server 2008,非常奇怪的事情;我在web.config文件中使用以下命令将所有内容从一个域重定向到另一个域上的特定页面: <?xml version="1.0" encoding="UTF-8"?> <configuration> <system.webServer> <httpRedirect enabled="true" destination="http://www.example.com/my-page.html" /> </sys

非常奇怪的事情;我在web.config文件中使用以下命令将所有内容从一个域重定向到另一个域上的特定页面:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
  <system.webServer>
    <httpRedirect enabled="true" destination="http://www.example.com/my-page.html" />
  </system.webServer>
</configuration>
如何在没有尾部斜杠的情况下强制重定向


谢谢

exactDestination=“true”
添加到配置中。应该是这样的

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
  <system.webServer>
    <httpRedirect enabled="true" destination="http://www.example.com/my-page.html" exactDestination="true" />
  </system.webServer>
</configuration>

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
  <system.webServer>
    <httpRedirect enabled="true" destination="http://www.example.com/my-page.html" exactDestination="true" />
  </system.webServer>
</configuration>