Magento – Magento Multisite (Subfolder) Blank Page

magento-1.9multistore

Today, I want to creat a new Website (Multisite – Subfolder method) for my Magento Page. (I'm working on a running Server).

What I have done:

  1. I Created a new Root – Subcategory (store2)

  2. I created a new Webstide in Magento/System/Configuration/Manage Stores
    (I'm working on a running Server):

Website -> name: mystore2 , code: mystore2

Store -> name: Main Store , ROOT Category: store2

Store View -> name: English , code: mystore2_en
,Status: enabled

  1. I created Subfolders on my Root Server –> name: en

  2. Changed URL Secure & Unsecure:

BASE URL: http://mydomain.at/en/

  1. I copied index.php and .htaccess to my subfolder
  2. Changed Index.php Codes — My Codes:

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

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


  • /* 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('mystore2', 'website');


Now, I got a blank Page…
Hope anyone can help me!

Best Answer

The problem is that just copying the index.php file will not do the trick, because all the app/ folder etc is missing.

To get around this, in your index.php you need to set the MAGENTO_ROOT to be one folder up:

define('MAGENTO_ROOT', getcwd() . '/..');

Then it should work.

However, you also want to make sure that your skin etc is loaded from the parent folder, so in your Magento backend, you will need to enter http://mydomain.at/ instead of http://mydomain.at/en/ for skin, images etc in the URL management.

Hope this helps!

Related Topic