0

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

Vibhore Jain
7071 gold badge7 silver badges16 bronze badges
asked Nov 3, 2017 at 9:47

2 Answers 2

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.

answered Nov 3, 2017 at 10:52
4
  • yes i have already fixed Commented Nov 3, 2017 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. Commented Nov 3, 2017 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; } Commented Nov 3, 2017 at 12:23
  • Please post your solution as answer for better readability and ease of understanding. Commented Nov 3, 2017 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;
}
Ranganathan
3,2382 gold badges19 silver badges38 bronze badges
answered Nov 3, 2017 at 13:09

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.