0

私は私に多くの悲しみを引き起こしている問題を抱えています。

同じサーバー上に2つのWebサイトをセットアップし(使用可能なIPは1つのみ)、ルートドメインとwwwもあります。&*。同じIPアドレスにトラフィックを送信するように定義されています。

それらを呼びましょう

http://siteA.com   DNS settup with siteA.com  www.siteA.com  *.siteA.com
http://siteB.com   DNS settup with siteB.com  www.siteB.com  *.siteB.com

siteAはデフォルトのウェブサイトである必要があります。*:80

*:80
siteA.com:80
www.siteA.com:80

siteB Webサイトでのバインドは、次の目的で存在します。

siteB.com:80
www.siteB.com:80

私が必要としているのは、*。siteB.comがsiteB.comにアクセスし、デフォルトのWebサイトにフォールスルーしないためのものです。現在、mce.siteB.comはsiteA.comにフォールバックします

私は多くの組み合わせを試しましたが、これを解決することはできません。

また、URLの書き換えをWebサイトレベルまたはIISルートレベルに配置しますか?

4

1 に答える 1

0

I worked it out in the end, and was purely from a lack of understanding of the URL Rewrite process.

Ended up being very simple

And added the following to the incoming rules of siteA.com, it was just a case of adjusting the pattern in the conditions field. I was taking the incoming url as a url and not the {QUERY_STRING} only.

<rewrite>
  <rules>
    <rule name="Redirect to siteB.com patternSyntax="ECMAScript" stopProcessing="true">
      <match url=".*" />
      <conditions>
        <add input="{HTTP_HOST}" pattern="^.*siteB\.com" />
      </conditions>
      <action type="Redirect" url="http://siteB.com/{R:1}" />
    </rule>
  </rules>
</rewrite>
于 2012-07-11T23:12:06.187 に答える