November Happy Hour will be moved to Thursday December 5th.

How to setup a multi-domains and culture instance

Vote:
 

I need to setup a multi-culture (language) environment. No problem. But 2 countries have 2 language cultures.
Swiss and Belgium.. Als long as I have one country with multi cultures there is no problem, but adding a second one did.

I like to have the next result:

- domainname.co.uk - en-GB
- domainname.es - es-ES
- domainname.ie - en-IE
- domainname.fr - fr-FR
- domainname.be/fr-BE - fr-BE
- domainname.be/nl-BE - nl-BE
- domainname.ch/fr-ch - fr-CH
- domainname.ch/de-ch - de-CH

What happend by using the below configuration is that all urls generated by the system for the CH cultures are with the belgium
domainname, probably because this is the first "no-culture-configured" site.

Admin screenshot

#132905
Aug 20, 2015 14:37
Vote:
 

I Finally fixed it myself. add the next lines to your web.config system.webserver section (for each multi language country/culture). The examples are for swiss only, but ofcourse you need to do this for belgium as well:

If you are running on Azure / the episerver digital cloud expierence platform also add:

<system.webServer>
    <urlCompression doStaticCompression="true" doDynamicCompression="false" dynamicCompressionBeforeCache="true" />
<rewrite>
      <rules>
        
        <!--swiss language redirects-->
        <rule name="de-ch" patternSyntax="ECMAScript" stopProcessing="true">
          <match url="de-ch.*" ignoreCase="true" />
          <conditions logicalGrouping="MatchAll" trackAllCaptures="true">
            <add input="{HTTP_HOST}" pattern="(.*).domainname.(?!ch)" ignoreCase="true" />
            <add input="{REQUEST_URI}" pattern="episerver/cms" ignoreCase="true" negate="true" />
          </conditions>
          <action type="Redirect" url="http://{C:1}.domainname.ch/{R:0}" />
        </rule>

        <rule name="fr-ch" patternSyntax="ECMAScript" stopProcessing="true">
          <match url="fr-ch.*" ignoreCase="true" />
          <conditions logicalGrouping="MatchAll" trackAllCaptures="true">
            <add input="{HTTP_HOST}" pattern="(.*).domainname.(?!ch)" ignoreCase="true" />
            <add input="{REQUEST_URI}" pattern="episerver/cms" ignoreCase="true" negate="true" />
          </conditions>
          <action type="Redirect" url="http://{C:1}.domainname.ch/{R:0}" />
        </rule>
      
      </rules>
      <outboundRules>

        <preConditions>
          <preCondition name="IsHTML">
            <add input="{RESPONSE_CONTENT_TYPE}" pattern="^text/html" />
          </preCondition>
        </preConditions>

        <!--swiss outbound redirects-->
        <rule name="fr-ch" patternSyntax="ECMAScript" preCondition="IsHTML">
          <match filterByTags="A" pattern="fr-ch.*" ignoreCase="true" />
          <conditions logicalGrouping="MatchAll" trackAllCaptures="true">
            <add input="{HTTP_HOST}" pattern="(.*).domainname.(?!ch)" />
            <add input="{REQUEST_URI}" pattern="episerver/cms" negate="true" />
          </conditions>
          <action type="Rewrite" value="http://{C:1}.domainname.ch/{R:0}" />
        </rule>

        <rule name="de-ch" patternSyntax="ECMAScript" preCondition="IsHTML">
          <match filterByTags="A" pattern="de-ch.*" ignoreCase="true" />
          <conditions logicalGrouping="MatchAll" trackAllCaptures="true">
            <add input="{HTTP_HOST}" pattern="(.*).domainname.(?!ch)" />
            <add input="{REQUEST_URI}" pattern="episerver/cms" negate="true" />
          </conditions>
          <action type="Rewrite" value="http://{C:1}.domainname.ch/{R:0}" />
        </rule>

      </outboundRules>
    </rewrite>
#133129
Aug 26, 2015 11:08
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.