首页 > 解决方案 > 将内部 SharePoint 网站移动到 Office 365 后如何进行 URL 重写

问题描述

我们在我们的服务器上托管了我们的 Intranet 站点,它们的格式为 - http://example.com/dept/page(s).aspx。公司决定将它们移至 Office 365,现在它们的格式为https://MyComp.SharePoint.com/dept/page(s).aspx

我想知道我们是否可以进行 URL 重写以将 Office 365 站点指向使用http://example.com/https://example.com/。请记住,/dept/page(s).aspx 在两个站点上是相同的。

非常感谢 URL 重写专家的帮助。

标签: url-rewritingiis-10

解决方案


根据您的要求,您可以使用如下重写规则:

<rule name="rule1">
    <match url="^(.*)$" />
    <conditions>
      <add input="{HTTP_HOST}" pattern="^https://MyComp.SharePoint.com$" />
    </conditions>
    <action type="Rewrite" url="http://example.com/{R:1}" />
</rule>

推荐阅读