1

I would like to setup a store in Magento 2.2 that is accessible from a subdomain.

example.co.za (main site - Fully Functional and Working)

a.example.co.za (store with unique categories etc)

I have created the store and store views, updated the base and secure URLs in the admin. I have also set the "Add store code to urls" to "Yes"

I have also linked them to the folders in the Primary domain using the following SSH:

ln -s ../app/ app

ln -s ../lib/ lib

ln -s ../pub/ pub

ln -s ../var/ var

MyIissue seems to be the code i put into the index.php and .htaccess files. These files where copied from the primary domain.

1 Answer 1

0

Copy index.php and htacess in your other "store" folder

and make changes here-

$params = $_SERVER;
$params[\Magento\Store\Model\StoreManager::PARAM_RUN_CODE] = 'website2'; // store or website
$params[\Magento\Store\Model\StoreManager::PARAM_RUN_TYPE] = 'website';

create symlink using SSH in other store folder.

ln -s ../app/ app
ln -s ../lib/ lib
ln -s ../pub/ pub
ln -s ../var/ var

also in admin please give path of base url , skin, media for another store in store configuration.

1
  • Hi, i assume the changes are just appended to the end of index.php. Thats where i have placed it and have the site running but there seems to be a style and media issue. Where must i check the skin and media?
    – Darren
    Commented Nov 13, 2017 at 14:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.