I am working on a development server and I need to create a Magento (1.9.2) website with 2 different stores inside with different theme, different products and different customers. At first I setup my first store, used a theme for it, played with it for a while then decided to add the second store (that would need to be accessed from a different domain when testing is done). So I followed this tutorial here: Magento Multistore Tutorial
I did everything described there using my own configuration but it is not working. here is what I did: 1. My domain is www.example.com 2. It is hosted on a VHost together with 2 other websites, so my var/www/html folder contains 3 folders:
www.example.com
www.example2.com
www.example3.com
2.I decided to install magento inside the first website, (inside www.example.com)
So I ended up with this structure (for the single store):
var/www/html/www.example.com/magento/
Now, following the tutorial from the above link:
- I created 2 subfolders inside /magento/: firststore and secondstore
- I copied inside each of them the .htaccess and index.php files from the /magento/ folder
- And then I edited them as explained in the tutorial, with the slight change caused by my folder structure. So, inside .htaccess file I changed the text as follows:
(for the file ../magento/firststore/.htaccess)
RewriteBase /magento/firststore/
and (for the file ../magento/secondstore/.htaccess)
RewriteBase /magento/secondstore/
Then I moved to the index.php files, and: (in the file ../magento/firststore/.htaccess I made it look like this)
$compilerConfig = MAGENTO_ROOT . '/../includes/config.php';
...
$mageFilename = MAGENTO_ROOT . '/../app/Mage.php';
...
Mage::run('firststore',$mageRunType);
Same for the second store, so:
$compilerConfig = MAGENTO_ROOT . '/../includes/config.php';
...
$mageFilename = MAGENTO_ROOT . '/../app/Mage.php';
...
Mage::run('secondstore',$mageRunType);
In the backend administration I created 2 websites, and each website has a Store and a storeview, so it's like this:
Main Website FirstStore FirstStoreView
(Code: firststore) (Root Category: Default Category) (Code: default)
secondstore.ro second store SecondStoreview
(Code: secondstore) (Root Category: Second root) (Code: secondstoreview)
Then in System->Configuration->General, with current configuration scope: First Store -->> BaseURL: http://www.example.com/magento/firststore/
for Current configuration scope: Second Store -->> BaseURL: http://www.example.com/magento/secondstore/
Now if I access the url: http://www.example.com/magento/firststore, or http://www.example.com/magento/firststore/index.php I get an empty page. No error messages, no nothing, just an empty page. Same goes for the secondstore. What am I doing wrong? What should I do to make it work?