Multiple domain pointing root folder need to point subfolders according to domain name in web.config Multiple domain pointing root folder need to point subfolders according to domain name in web.config wordpress wordpress

Multiple domain pointing root folder need to point subfolders according to domain name in web.config


I don't have a full answer for you, but the stopProcessing="true" on every rule may be causing you some grief, because it stops the rules from being processed further, so your second and third rules will be ignored when you set this flag on the first rule.

You also have your pattern set to match "*\" on all three rules, so perhaps a rule like this could work:

<rules>   <rule name="Domain2">      <match url="*.domain2.*" />      <conditions>         <add input="{UrlDecode:{QUERY_STRING}}" pattern="domain2" />      </conditions>      <action type="Rewrite" url="{HTTP_HOST}/domain2/" />   </rule></rules>