Tuesday, December 8, 2015

Magento 2 Admin url 404 not found

If you create a virtual host in Windows XAMPP server (eg localhost:8081), which points to your magento 2 root, you need to do the following fix, in order to avoid 404 not found, when you access magento admin .

Go to app/code/Magento/Backend/App/Area/FrontNameResolver.php (in line 88)

Replace

$host = isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : '';


With

$host = isset($_SERVER['HTTP_HOST']) ? parse_url($_SERVER['HTTP_HOST'], PHP_URL_HOST) : '';

No comments:

Post a Comment