Question

I have One wholesaler folder in magento root in which one index.php file in that file i found this code

/**
 * Compilation includes configuration file
 */
$compilerConfig = 'includes/config.php';
if (file_exists($compilerConfig)) {
    include $compilerConfig;
}

$mageFilename = '../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_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);

Mage::run('wholesale', $mageRunType);

I am Upgrading Magento version. My Issue is my site is redirecting on live site when I put Mage::run('wholesale', $mageRunType); instead of //Mage::run($mageRunCode, $mageRunType); in index.php.

Actually, i don't know actual use of $mageRunCode.

Was it helpful?

Solution

stoe For this : Actually, i don't know actual use of $mageRunCode.

$mageRunCode = 'your store code'

Magento need store code and store type to run. first param is store code and second ($mageRunType) is type of run website weather as store or webiste.

So $mageRunType is

1) store

or

2) website.

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top