Latest Oxid 6.2.3 and two domains

As suggested, creating new topic for this to find the best way.
The task is very simple:
Having two domains, domain.cz and domain.com, both going with A record to same IP and they are set as virtual hosts in apache pointing into same oxid directory.
I want to enable 2 languages CZ and EN and set oxid the way anytime the language will be changed in frontend it will only change .cz to .com and opposite while clicking on flag but the rest of the link will remain nice - nothing like language=2 etc.
Please what is the best way to reach this?
Currently I am having all 3 rows (url, surl, adminurl) in config.inc.php set as https://domain.cz (and /admin for last one) because I have apache permanent redirect for vhosts from http to https - I dont want any http communication except “first touch” therefore https also for basic url.
Not sure if I should define URL and sURL for each language under Admin-Settings-Language and if yes then if to set both values with https:// (same as in config.inc.php)
Another question will be if all content will load properly for EN language with .com when I specify it under Langauage properties as in main config.inc.php it will still be set as .cz
What will be the best solotion to achieve this please? Any change/s needed anywhere else in oxid files?
Thank you.

Hey @bass,

the language behaviour depends on the settings of your browser: If it is set to CZ as native language, it will lead you (on a first attempt) to the CZ site of your shop. If it is set to EN, the .com site shall appear if you have configured it correctly in your language settings of the shop.

Please note that cookies will handle these changes - make sure to clean them up in your local (browser) settings before hitting your domain again.

Also, EN (and with it, the .com domain) should be the fallback language if somebody visits your shop who doesn’t have CZ or EN in his browser preferences.

Also take in charge that the assignment of other domains or subdomains may influence the way your shop web site is considered by search engines as different (sub)domains mean different sites as well; so it depends on which audience do you want to make happy with your product range :wink:

Hello @marco.steinhaeuser,

thank you for your reply.

I was thinking the way I can set domains strictly to languages. With this, whoever over the world will put domain.cz into browser and will receive CZ version no matter of his local/language settings. And same for domain.com - automatically receive EN version of oxid even when located in CZ, GB or in e.g. South Africa.

Based on what you wrote it looks to me like when I am located in CZ and having all system including browser in CZ, I will always receive CZ language even when I type domain.com into browser.
And vice-versa, if cz native speaker living in e.g. Great Britain and having all system incl. browser in english and will type domain.cz into browser, he will automatically receive EN version although under cz domain.

Isnt this weird? To me it makes much more sense to define strictly cz domain = cz version and en domain = en version and who cares about language settings in browser.

E.g. when I visit amazon.com I have it in EN, amazon.de in DE - with your theory I should receive amazon.de in EN as a “backup language” as nothing in my PC system is set for DE language.

Am I missing something?

Not as weird as it looks like from a first glance as nearly every CMS is working like this. Amazon might be a bit different: looks like they are using different instances or multi tenants (available in OXID EE) to achieve that behaviour.

Oh and yet another remark: it’s not about one’s location but the language you use in your system (browser) :wink:

Hi,
switching between 2 domains instead of 2 languages is not a problem, but the user normally loses his session, if he is logged in. Login over 2 Domains (de/com) is not possible on amazon too. However, there is a module solution from a oxid-bridge, which does it.

Now to do it like amazon: You need a module (e.g. multishop small CE).

Hello,
thank you for your answers.
For me it will be enough the language change will switch only and the rest (login/cart/etc.) will stay the same.
So would it be better I set apache redirect from .com to .cz and whole shop to be running under .cz only while having to switch language with flag icon?
Or you suggest different approach/settings?
Thank you.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.