使用IIS URL请求将多个浏览器请求redirect到一个站点

我们有一个Web服务器与几个网站。 其中,只有一个站点具有实际内容,其他站点用于将请求redirect到内容站点。 这由IIS httpredirect完成。

  • www.contentsite.com – >网站内容
  • www.othersite1.com – >redirect到内容站点(IIS httpredirect)
  • www.othersite2.com …

是否有可能通过使用IIS URL重写模块来实现这一点,以便redirect站点可以被省略?

是的,添join站规则。 将其设置为:

  • 匹配URL: .*以匹配任何请求path
  • 条件: {HTTP_HOST}匹配模式www2.example.org – 使用此部分来匹配您的其他主机名,例如为www3.example.org添加另一个{HTTP_HOST} ,并将条件逻辑分组设置为Match Any
  • 行动: Redirect
  • 操作属性: http://www.example.orghttp://www.example.org