Url rewriting 使用Intelligencia.UrlRewriter将www子域重定向到根域

Url rewriting 使用Intelligencia.UrlRewriter将www子域重定向到根域,url-rewriting,Url Rewriting,如何在ASP.NET web.config文件中配置Intelligencia.UrlRewriter以将所有流量重定向到?谢谢你,dana,但以下是我最后添加到web.config文件中的内容 <system.webServer> <rewrite> <rules> <rule name="Redirect to WWW" stopProcessing="true"> <match url=".*"

如何在ASP.NET web.config文件中配置Intelligencia.UrlRewriter以将所有流量重定向到?


谢谢你,dana,但以下是我最后添加到web.config文件中的内容

<system.webServer>
  <rewrite>
    <rules>
      <rule name="Redirect to WWW" stopProcessing="true">
        <match url=".*" />
        <conditions>
          <add input="{HTTP_HOST}" pattern="^www.mysite.com$" />
        </conditions>
        <action type="Redirect" url="http://mysite.com/{R:0}" redirectType="Permanent" />
      </rule>
    </rules>
  </rewrite>
</system.webServer>

<system.webServer>
  <rewrite>
    <rules>
      <rule name="Redirect to WWW" stopProcessing="true">
        <match url=".*" />
        <conditions>
          <add input="{HTTP_HOST}" pattern="^www.mysite.com$" />
        </conditions>
        <action type="Redirect" url="http://mysite.com/{R:0}" redirectType="Permanent" />
      </rule>
    </rules>
  </rewrite>
</system.webServer>