Skip to content

What replaced Mage::run()? #514

@joejack22

Description

@joejack22

Hello everyone,

I have searched the WIKI and could not find what can be used now in the index file to load different store and website views.

Typically the following would work.

/* 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);

However, as expected, I get the Mage class not found error.

I don't want to do it with my .htaccess file.

Is there a function/class that does this in Magento2?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions