Magento – creating multiple store on same domain magento

store-view

I am trying to run two Magento stores via same admin panel i have a magento installed at domain name/magento now as a first step i have go catalog->Manage Category and add two different root category for two different store and set Is Anchor to yesand Is Active to yes now i go to sytem->Manage Store and make other store name magento2 now i go to folder where my magento is installed and make the a folder name magento2 then copy the .htacess and index.phpfrom root folder to magento2 folder then edit the .htacces and index.php file then I have replace the following code

"$mageFilename = ‘app/Mage.php’;" with $mageFilename = ‘../app/Mage.php’; and in .htaccess file add the following line at the bottom SetEnvIf Host .*base.* MAGE_RUN_CODE="base"; SetEnvIf Host .*magento_site_2.* MAGE_RUN_TYPE="magento2";

now i go to system->configuration and the store view to magento2 then i go to genral->web and in base link url option under secure and unsecure tab add the following code

{{unsecure_base_url}}magento2/ 

when i open the url www.mydomain.com/magento/magento2/ then page is displaying only blank page and also www.mydomain.com/magento url not working properly.
Products and categories page are not working. That pages are giving error page not found.
What should I do now? Any help or suggestions please give.

how to create different store view on same domain magento?

thank you.

Best Answer

You can try with below steps. It worked for me.

Setp 1

i) Create folder MAGE_ROOT/magento2/

ii) Copy your magento root index.php and .htaccess

Setp 2

i) Open index.php, find below line and replace your_store_code with store code

$mageRunCode = isset($_SERVER['MAGE_RUN_CODE']) ? $_SERVER['MAGE_RUN_CODE'] : 'your_store_code'; $mageRunType = isset($_SERVER['MAGE_RUN_TYPE']) ? $_SERVER['MAGE_RUN_TYPE'] : 'store';

ii) Open .htaccess files and give your folder path

RewriteBase /magento2/

Step 3

i) Go to System->Configuration then select store view and General->Web

ii) Under Unsecure and Secure Base URL http://yourdomain/magento2/

iii) If ii(setp 3) don't load styles, js and media files, please set yourdomain_link/skin/, yourdomain_link/media/ and yourdomain_link/js/

Hope it will help you. Best of luck!

Related Topic