I've been doing a lot of reading on how best to implement multistore in Magento and I'm getting a lot of conflicting information. There doesn't seem to be one single best practice approach to doing this.
I want to have subfolders for my stores; so something along the lines of; mydomain.com/store1, mydomain.com/store2.
I've been following this instruction;
I've added subfolders to the Magento root for each of my websites and copied across index.php and .htaccess. I've changed ownership of the folders and these files using chown to magento:www-data to match the files in root. It's not mentioned in the instructions, but I was getting 403 errors so I expect it's required.
In editing index.php the first problem that I has was that they state to find the line that looks like this;
$mageFilename = MAGENTO_ROOT . '/app/Mage.php';
There is no such line.
I've used the commented example from index.php and added the following lines;
$params[\Magento\Store\Model\StoreManager:ARAM_RUN_CODE] = 'uk';
$params[\Magento\Store\Model\StoreManager:ARAM_RUN_TYPE] = 'website';
uk is the code for my default website.
When I navigate to the store all I get is a blank page.
With do much condradictory, inaccurate and incomplete information out there and no clear documentation from Magento, I'm at a loss to understand how this should work. It all feels very much like a "hack" to make Magento do something that it really wasn't built to do.
I know some people are suggesting the use of symlinks, but there is a lot of information out there that indicated that this is a major security risk and some hosting services do not allow them, so I don't want to go down that route.
There are implementations of multistore out there. How are people doing it? What is best practice for implementing multistore in Magento?