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.

General Questions /

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

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

handling multiple domains with a multi-lingual site


Reply


845 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