skip to Main Content

How to call Multiple Website Store in sub folder of main magento installation?

HowMultiple Website Store call in sub folder of main magento installation directoy with same bakend.

Index.php

$mageFilename = '../app/Mage.php';
require_once $mageFilename;
/* Store or website code */
$mageRunCode = isset($_SERVER['MAGE_RUN_CODE']) ? $_SERVER['MAGE_RUN_CODE'] : 'abc';
/* Run store or run website */
$mageRunType = isset($_SERVER['MAGE_RUN_TYPE']) ? $_SERVER['MAGE_RUN_TYPE'] : 'website';
Mage::run($mageRunCode, $mageRunType);

.htaccess File is:

RewriteCond %{REQUEST_URI} ^/abc/$
RewriteRule .* - [E=MAGE_RUN_CODE:store]
RewriteCond %{ENV:REDIRECT_MAGE_RUN_CODE} (.+)
RewriteRule .* - [E=MAGE_RUN_CODE:%1]

But then after category URL go to 404 page.

3

Answers


  1. In case if category URL returns 404 page, make sure you reindexed “Catalog URL Rewrites”

    Login or Signup to reply.
  2. It seems there is any issue in your .htacess. Please change your .htacess file with new one and then reindex.

    Login or Signup to reply.
  3. So you can remove either the .htaccess or index.php override.

    $params[MagentoStoreModelStoreManager::PARAM_RUN_CODE] = $mageRunCode;
    $params[MagentoStoreModelStoreManager::PARAM_RUN_TYPE] = $mageRunType;
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search