cancel
Showing results for 
Search instead for 
Did you mean: 

Magento 1.9 Multi Store with Multi Website

Magento 1.9 Multi Store with Multi Website

Hi,

 

We need to add multi stores in Magento 1.9 for different countries. 

1. First, we added new root category (Canada store) with display settings also.

2. Then created New Store, New Website, and Store View.

3. Then we go System Configuration - Web and changed secure and unsecure Base URLs. Our main website URL is in the form of IP address. So we added new store website URL is same IP address and in last we added the new name. (http://xx.xx.xxx.xxx/website_1)

4. After that, We checked this URL in the browser. But we got the following error message.

Not Found
The requested URL /website_1/ was not found on this server.

 

Please guide us to solve this problem.

 

Thanks,

Karthik

 

9 REPLIES

Re: Magento 1.9 Multi Store with Multi Website

I think you were missing at the end of / in your URL.

You must add a slash(/) to end of URL in secure and unsecure url tab.

Add

http://xx.xx.xxx.xxx/website_1/

Any of the fields allow fully qualified URLs that end with '/' (slash) e.g. http://example.com/magento/

Clear cache and check.

If Issue Solved, Click Kudos/Accept As solutions.

Re: Magento 1.9 Multi Store with Multi Website

Hi,

Thanks for your reply. We added the slash(/) to end of URL in secure and unsecure URL tab. And cache cleared but still getting same error message only.

 

Please give a suggestion to solve this.

 

Thanks,

Karthik

Re: Magento 1.9 Multi Store with Multi Website

If you have still issue you can refer below blogs links for your issue,

Might be someone will be useful for your case,

 

From Inchoo blog,

http://inchoo.net/magento/how-to-set-multiple-websites-with-multiple-store-views-in-magento/

 

second blog,

https://www.properhost.com/support/kb/30/How-To-Setup-Magento-With-Multiple-Stores-And-Domains

 

From Stackexchange,

https://magento.stackexchange.com/questions/199924/magento1-9-adding-multi-domain-in-multi-website

 

I hope you have useful one of the blogs.

 

 

If Issue Solved, Click Kudos/Accept As solutions.

Re: Magento 1.9 Multi Store with Multi Website

Hi @jeganee

 

If you wanted to create a new store (Canada) as you mention - then firstly you don't required to create a new website.

 

Create a one store and assign the new root category which you have already created and create store view only !

 

Now if you wanted to check this , you don't required to change full website address , instead of that -> allowed Add store code to Urls to Yes !

 

So in the url it will looks like , www.domain.com/canadastore

 

So store code will be added to your website ! and you will access your canada store for the same !

 

Hope it helps !

if issue solved,Click Kudos & Accept as Solution

Re: Magento 1.9 Multi Store with Multi Website

HI,

 

As referred to blogs, we added the following codes in the index.php file.

switch($_SERVER['HTTP_HOST']) {
case 'http://xy.xy.xyz.xyz':
case 'http://xy.xy.xyz.xyz':
$mageRunCode = 'base';
$mageRunType = 'website';
break;
case 'http://xy.xy.xyz.xyz/website_1/':
case 'http://xy.xy.xyz.xyz/website_1/':
$mageRunCode = 'canadastore';
$mageRunType = 'website';
break;
}

 

But we have this project is on our local server only. Not in Cloud servers. Do we need to do Domain Mapping also?

 

Thanks,

Karthik

Re: Magento 1.9 Multi Store with Multi Website

Hi,

I added my index.php following.

 

<?php

define('MAGENTO_ROOT', getcwd());

$compilerConfig = MAGENTO_ROOT . '../includes/config.php';
if (file_exists($compilerConfig)) {
include $compilerConfig;
}

$mageFilename = MAGENTO_ROOT . '../app/Mage.php';
$maintenanceFile = 'maintenance.flag';

if (!file_exists($mageFilename)) {
if (is_dir('downloader')) {
header("Location: downloader");
} else {
echo $mageFilename." was not found";
}
exit;
}

if (file_exists($maintenanceFile)) {
include_once dirname(__FILE__) . '/errors/503.php';
exit;
}

require MAGENTO_ROOT . '/app/bootstrap.php';
require_once $mageFilename;

#Varien_Profiler::enable();

if (isset($_SERVER['MAGE_IS_DEVELOPER_MODE'])) {
Mage::setIsDeveloperMode(true);
}

#ini_set('display_errors', 1);

umask(0);

/* Store or website code */
$mageRunCode = isset($_SERVER['MAGE_RUN_CODE']) ? $_SERVER['MAGE_RUN_CODE'] : '';

/* Run store or run website */
$mageRunType = isset($_SERVER['MAGE_RUN_TYPE']) ? $_SERVER['MAGE_RUN_TYPE'] : 'store';

Mage::run($mageRunCode, $mageRunType);

switch($_SERVER['HTTP_HOST']) {
case 'http://xx.xx.xyz.xyz':
case 'http://xx.xx.xyz.xyz':
$mageRunCode = 'base';
$mageRunType = 'website';
break;
case 'http://xx.xx.xyz.xyz/st2_english/':
case 'http://xx.xx.xyz.xyz/st2_english/':
$mageRunCode = 'base';
$mageRunType = 'website';
break;
case 'http://xx.xx.xyz.xyz/canadawebsite/':
case 'http://xx.xx.xyz.xyz/canadawebsite/':
$mageRunCode = 'canadawebsite';
$mageRunType = 'website';
break;

}

 

Here how to do the domain mapping?

 

Please check and let me know the solution for this!.

 

 

Thanks,

Karthik

Re: Magento 1.9 Multi Store with Multi Website

Hi,

 

I added as per you suggested. But now I am getting "

WHOOPS, OUR BAD...

"

 

But after changed I added following code in my index.php file.

 

switch($_SERVER['HTTP_HOST']) {
case 'http://xx.xx.xxx.xxx':
case 'http://xx.xx.xxx.xxx':
$mageRunCode = 'base';
$mageRunType = 'website';
break;
case 'http://xx.xx.xxx.xxx/st2_english/':
case 'http://xx.xx.xxx.xxx/st2_english/':
$mageRunCode = 'base';
$mageRunType = 'website';
break;
case 'http://xx.xx.xxx.xxx/canadawebsite/':
case 'http://xx.xx.xxx.xxx/canadawebsite/':
$mageRunCode = 'canadawebsite';
$mageRunType = 'website';
break;

}

 

Please check and let me know the solution for this.

 

Thanks,

Karthik

Re: Magento 1.9 Multi Store with Multi Website

HI,

 

As referred to blogs, we added the following codes in the index.php file.

switch($_SERVER['HTTP_HOST']) {
case 'http://xy.xy.xyz.xyz':
case 'http://xy.xy.xyz.xyz':
$mageRunCode = 'base';
$mageRunType = 'website';
break;
case 'http://xy.xy.xyz.xyz/website_1/':
case 'http://xy.xy.xyz.xyz/website_1/':
$mageRunCode = 'canadastore';
$mageRunType = 'website';
break;
}

 

But we have this project is on our local server only. Not in Cloud servers. Do we need to do Domain Mapping also?

 

How to do Domain Mapping? Please suggest me to do fix this issue.

 

Thanks,

Karthik

Re: Magento 1.9 Multi Store with Multi Website

Hi,

Magento 1.9 Multi Store with Multi Website

 Finally We got some error,please give solution for that.

 Error Like

WHOOPS, OUR BAD...

The page you requested was not found, and we have a fine guess why.

  • If you typed the URL directly, please make sure the spelling is correct.
  • If you clicked on a link to get here, the link is outdated.

What can you do? Have no fear, help is near! There are many ways you can get back on track with Magento Store.

  • Go back to the previous page.
  • Use the search bar at the top of the page to search for your products.
  • Follow these links to get you back on track!
    Store Home | My Account

 

Thanks,