2017-05-06 1 views

Antwort

-1

ist es möglich, dass Sie die Rewrite verwenden könnte die Domäne

<rewrite> 
     <rules> 
     <rule name="Force non-WWW and SSL" enabled="true" stopProcessing="true"> 
      <match url="(.*)" /> 
      <conditions logicalGrouping="MatchAll"> 

      <add input="{HTTP_HOST}" negate="true" pattern="^www.(.*)$" ignoreCase="true" /> 
      </conditions> 
      <action type="Redirect" url="https://www.{C:1}/{R:1}" appendQueryString="true" redirectType="Permanent" /> 
     </rule> 
     </rules> 
    </rewrite>  
0

Es ist möglich, mit URL-Rewrite zu umleiten, müssen Sie diese Regel verwenden:

<rule name="all domains to www.domainB.com/my-folder" stopProcessing="true"> 
    <match url="(.*)" /> 
    <conditions logicalGrouping="MatchAny"> 
     <add input="{HTTP_HOST}" pattern="^domainA.co.uk$" ignoreCase="true" /> 
     <add input="{HTTP_HOST}" pattern="^www.domainA.co.uk$" ignoreCase="true" /> 
     <add input="{HTTP_HOST}" pattern="^domainA.com$" ignoreCase="true" /> 
     <add input="{HTTP_HOST}" pattern="^www.domainA.com$" ignoreCase="true" /> 
    </conditions> 
    <action type="Redirect" url="http://www.domainB.com/my-folder/{R:1}" /> 
</rule> 

Es Urls umleitet:

  • domainA.co.uk zu www.domainB.com/my-folder/
  • www.domainA.co.uk-www.domainB.com/my-folder/
  • domainA.com-www.domainB.com/my-folder/
  • www.domainA.com-www.domainB.com/my-folder/
  • www.domainA.com/something-www.domainB.com/my-folder/something (im Fall, wenn Sie das nicht wollen, entfernen Sie einfach {R:1} Form-Regel)
Verwandte Themen