0

We have added multiple websites in different domains but it does not redirect the website, all required setting are enabled

0

You may have skipped or missed a step.

Please check below steps:

  • Create root categories for different websites. (Not mandatory, but recommended)
  • Create multiple websites, their respective stores, and store views.
  • Create folders for newly created websites, copy index.php and .htaccess files into these folders and make necessary changes in index.php or .htaccess files.
  • Make changes in secure and unsecure Base URLs of different websites from System > Configuration > General (Web) section. Do remember to select a particular website to set Base URL.

Please let me know if you are able to fix the issue.

  • yes i have already fixed – Rajesh Nov 3 '17 at 12:14
  • If my solution worked for you, please upvote. If not, please share the way, you fixed the problem, so that others can also get the benefit. – Mohit Kumar Arora Nov 3 '17 at 12:17
  • ok Magneto Multi store Setup first we website created on System->Manage Stores create a website, store and store view. Make a note of the codes as you need those in the code below in that switch($_SERVER['HTTP_HOST']) { case 'first-store.com': case 'www.example1.com': Mage::run('website_code1', 'website'); break; case 'example2.com': case 'www.second-store.com': Mage::run('website_code1'', 'website'); break; default: Mage::run(); break; } – Rajesh Nov 3 '17 at 12:23
  • Please post your solution as answer for better readability and ease of understanding. – Mohit Kumar Arora Nov 3 '17 at 12:29
0

Here is very brief guide:

First create the website,store. This is all done via the Magento administration.

System->Manage Stores

for each store that you want, create a website, store and store view. Make a note of the codes as you need those in the code below.

Then in your index.php file have some code like this:

switch($_SERVER['HTTP_HOST']) {

     case 'example1.com':
     case 'www.example1.com':
        Mage::run('website_code1', 'website');
     break;

     case 'example2.com':
     case 'www.example2.com':
        Mage::run('website_code2', 'website');
     break;


     default: //run the default store if for some reason the above hasn't worked.
        Mage::run();
     break;
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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