我正在将一些Sharepoint站点从一个服务器场迁移到另一个服务器场。这是一个更复杂一点,但为了简单起见...使用IIS URL重写模块修改查询字符串
我想维护的是人们对这些网站,文档等的旧网址和IIS URL重写模块似乎是一种很好的方式来走。
这里的结构是什么样的想法:
_______________________ _______________________
|oldfarm.company.com**| |newfarm.company.com**|
|oldsitecollection** | |newsitecollection** |
|subsitename | |subsitename |
|... | |... |
|_____________________| |_____________________|
** =的变化,一切依旧,URLwise。
在“newfarm”我已经扩展了Web应用程序,以回应“oldfarm.company.com”,而Web应用程序具有URL重定向规则重定向http://oldfarm.company.com/oldsitecollection/ ...到... http://newfarm.company.com/newsitecollection/
这对于我正在尝试做的绝大多数工作很有用。
我很困难的是重写QUERYSTRING值。 Sharepoint的Office文档查看器包含QUERYSTRING中的路径信息,这就是我需要改变的。
我尝试过使用重写映射,因为这些不是动态替换,但我无法让它们修改QUERYSTRING。
这里是我工作的重写规则的例子:
<rewrite>
<rewriteMaps>
<rewriteMap name="WordViewer">
<add key="id=/oldsitecollection" value="id=/newsitecollection" />
</rewriteMap>
</rewriteMaps>
<rules>
<rule name="Rewrite rule1 for WordViewer">
<match url=".*WordViewer.aspx" />
<conditions>
<add input="{WordViewer:{QUERY_STRING}}" pattern="(.+)" />
</conditions>
<action type="Rewrite" url="{C:1}" appendQueryString="false" />
</rule>
</rules>
</rewrite>
嗨,我在面对问题类似的情况 - 你能否请回答 - http://stackoverflow.com/questions/34506551/reading-cookie-value-using-url-rewrite-for-iis-wizard-unable-to-validate-at – codetoshare 2015-12-30 04:38:00