我有一个 godaddy (windows) 托管帐户,我想重定向:
www.example.com/folder/some
至www.example.com/folder/some.html
我尝试添加此 Web.config 文件,但找不到为重定向 html 添加什么规则
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="Add www" stopProcessing="true">
<match url=".*" ignoreCase="true" />
<conditions logicalGrouping="MatchAll">
<add input="{HTTP_HOST}" negate="true" pattern="^www\.(.+)$" />
<add input="{HTTP_HOST}" negate="true" pattern="^[^.]*dav.*" />
</conditions>
<action type="Redirect" url="http://www.{HTTP_HOST}/{R:0}" appendQueryString="true" redirectType="Permanent" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>