使用 IIS 7.5 重写条件 URL



我们有一个双语SharePoint网站,并希望确保所有法语内容都通过我们的法语域进行汇集,我们称之为_frenchdomain.com。

SharePoint 中的语言变体按文件夹结构分隔,因此在本例中,您可以转到 _http://englishdomain.com/en 表示英语内容,http://englishdomain.com/fr 转到 _ 表示法语内容。

我的问题是我如何让 IIS 识别 _http://englishdomain.com/fr/* 的任何实例,然后将其重写为 _http://frenchdomain.com/fr/*

    <rule name="fr">
      <match url="fr/.*"/>
      <conditions>
        <add input="{HTTP_HOST}" pattern="^frenchdomain.com$" negate="true" />
      </conditions>
      <action type="Redirect" url="http://frenchdomain.com/{R:0}" redirectType="Permanent"/>
    </rule>

最新更新