Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

handling multiple domains with a multi-lingual site


Go to End


1205 Views

Avatar
ChrisBryer

Community Member, 95 Posts

7 July 2009 at 11:05am

We have just built a multi-lingual site on version 2.3.2, and things seem to work great for the most part. I am a little confused on how to work with multiple domains. the site was originally built on a .com domain, however the client has purchased .de, .fr (etc...) domains and i have these extra domains pointing at the .com domain and redirect to the appropriate homepage (like /haus) instead of /home. I also have a language chooser at the top, so on the homepage, people can switch between the german and the english homepage

the first problem i have is that the .de domain redirects / (or /home) to /haus, so if you are on the german domain and select english in the language chooser the site redirects back to /haus because of the redirect on the .de domain. is there a better way to direct a .de domain to go to the german homepage?

the second problem that i have is that the customer wants 2 different profiles for google analytics (one report for visits to the .com domain and one report for visits to the .de domain), so i have a method in the Page model to determine what the absoluteBaseURL is and embed the correct google analytics javascript code. the script works and i see the correct google analytics code getting embedded on each domain, however google analytics isnt recognizing the second domain and I'm not sure why. is it the redirect that is messing up google analytics?

I am not sure if there is a better setup for handling multiple domains, but if anyone has any ideas / suggestions or experience with this, i would love to hear your thoughts.

thanks,
-Chris