.net 用于url重定向的Strip.html
我正在做一个重定向从一个旧网站到一个新的网站,使用友好的网址 进入的url是example.com/news-events/some-news-story.html,它会重定向到anotherdomain.com/news/some-news-story 到目前为止,我建立的规则除了从末尾删除.html之外,其他的都可以执行,因此它可以重定向到anotherdomain.com/news/some-news-story.html 这应该很简单,但我画了一个空白 规则如下:.net 用于url重定向的Strip.html,.net,url,redirect,web-config,url-redirection,.net,Url,Redirect,Web Config,Url Redirection,我正在做一个重定向从一个旧网站到一个新的网站,使用友好的网址 进入的url是example.com/news-events/some-news-story.html,它会重定向到anotherdomain.com/news/some-news-story 到目前为止,我建立的规则除了从末尾删除.html之外,其他的都可以执行,因此它可以重定向到anotherdomain.com/news/some-news-story.html 这应该很简单,但我画了一个空白 规则如下: <rules&g
<rules>
<rule name="Redirect news posts" stopProcessing="true">
<match url="^news-events/(.*)$" ignoreCase="false" />
<action type="Redirect" redirectType="Permanent" url="http://www.anotherdomain.com/news/{R:1}" />
</rule>
</rules>
感谢您的帮助/建议。也通过在URL上运行此规则来解决此问题
<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}.html" />
</rule>
从哪来的