I want to create two new shops beside my current one. The domain should be the same, but I want to add some suffixes to the domain for the other two stores. So I want a shop structure like the following:
Multistores:
Shop 1: example.com/
Shop 2: example.com/eu/
Shop 3: example.com/us/
Multilanguages:
Shop 2: example.com/eu/en/
Shop 2: example.com/eu/fr/
Shop 3: example.com/us/en/
Shop 3: example.com/us/fr/
For this reason I have created the following structure inside the magento backend:
Shop 2 (code: base_eu) Store EU German (code: eu_de)
English (code: eu_en)
Shop 3 (code: base_us) Store US German (code: us_de)
English (code: us_en)
Furthermore I have created two subdirectories inside my magento root folder (eu/ and us/) which represents the "Shop 2" and "Shop 3" and I have changed the base url of this two shops to example.com/eu/ and example.com/us/.
In Addition I have created a lot of symlinks (app, errors, includes, js, lib, media, skin, var, index.php) and I have copied the .htaccess inside the subdirectories eu/ and us/.
After this I have modified the htaccess files in both folders:
eu/.htaccess -> SetEnv MAGE_RUN_CODE eu_de
us/.htaccess -> SetEnv MAGE_RUN_CODE us_de
So the default store view of both pages is the german store view.
A another solution is to edit the index.php of both directories and add something like this:
$mageRunCode = 'base_eu';
$mageRunType = 'website';
Mage::run($mageRunCode, $mageRunType);
So I can avoid the htaccess changes, but the result would be the same.
This works great so far, but how can I add the other store views now? Should I add another subdirectories inside the directories for each language or is there a better way to do this?
EDIT
I have tried something like this now:
magento_root
app
...
eu
(symlinks app, media, ...)
index.php
.htaccess
en
(symlinks app, media, ...)
index.php
.htaccess
It's working so far, but this seems to be a little bit tricky.