A client wants his multistore shop to be set up like this:
- http://www.domain1.org/de/ -> website 1, store view 1
- http://www.domain1.org/en/ -> website 1, store view 2
- http://www.domain1.ch/de/ -> website 2, store view 3
- http://www.domain1.ch/fr/ -> website 2, store view 4
- http://www.domain1.ch/it/ -> website 2, store view 5
This is an example but there may be many more different subfolders. What is the best approach to handle different subfolders for different store views / websites?
I know that one solution is to create subfolders called
en etc. and copy the index.php and .htaccess into the corresponding subfolders.
There also may be some workarounds (symlinks for index.php, vHost configuration instead of using .htaccess) to minimise file duplication but I'd like to find a solution where I don't have to do any changes in the file system but just handle everything by configuration.
We verified with Enterprise support that the best way to do this is by creating subfolders.
We ended up doing it like this:
- Create a "languagefolders" directory
- Created a copy of index.php inside the directory along with an adjusted .htaccess and symlinks to the Magento folders (app/, errors/, ...)
- Created symlinks "de", "en" etc. inside the Magento root directory pointing to the "languagefolders" directory
This way we can add a new language by creating a new symlink (e.g. "fr").