0

example.com を www.example.com に、example.de を www.example.de にリダイレクトしたい

<rule name="CanonicalHostNameRuleCOM" stopProcessing="true">
      <match url="(.*)" />
      <conditions>
        <add input="{HTTP_HOST}" negate="false" pattern="^example\.com$" />
      </conditions>
          <action type="Redirect" url="http://www.example.com/{R:1}" redirectType="Permanent" />
        </rule> 
<rule name="CanonicalHostNameRuleDE" stopProcessing="true">
      <match url="(.*)" />
      <conditions>
        <add input="{HTTP_HOST}" negate="false" pattern="^example\.de$" />
      </conditions>
          <action type="Redirect" url="http://www.example.de/{R:1}" redirectType="Permanent" />
        </rule>
4

1 に答える 1

0

.COM と .DE については、以下を試してください

.com

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

.de

<rule name="Redirect to WWW DE" stopProcessing="true"> 
  <match url=".*" /> 
  <conditions> 
    <add input="{HTTP_HOST}" pattern="^example.de$" /> 
  </conditions> 
  <action type="Redirect" url="http://www.example.de/{R:0}" redirectType="Permanent" /> 
</rule>

これが役立つことを願っています

于 2012-11-13T09:58:00.050 に答える