我想弄清楚如何确保 301 重定向仅适用于父级及其子级。 孩子们应该有相同的网址。
这是 web.config 中的代码:
<rule name="Rewrite Change of my parent page" stopProcessing="true">
<match url="^my_old_parent$" ignoreCase="false" />
<action type="Redirect" url="/New-Parent-Page/" redirectType="Permanent" />
</rule>
我尝试了不同的变体,但没有任何效果。 我看着这个线程: 301 重定向 - 重定向父级而不是子级
他们提到使用 RedirectMatch 而不是 Redirect,它不适用于 IIS。
我很欣赏关于将哪些代码用于 IIS 10 的想法。
谢谢,
多伦
尝试 RedirectMatch 时,我收到一条错误消息。