0

I have Magento (1.9.2.1) installed in a subdirectory and turned "maintenance mode on". Unfortunately, it doesn't load styles/images (e.g. "http://example.com/errors/default/images/logo.gif" is 404 Not Found) for error pages, in this case "Error 503: Service Temporarily Unavailable" page. Basically, an incorrect path produces 404 because it doesn't include a subdirectory. How can I fix this?

Related to: Error page styles not loading

4
  • are you able to login to admin area? Sep 4, 2015 at 1:21
  • Make sure that you have subdirectory in configuration for patch 'web/secure/base_url' e.g. example.com/subdir.
    – kuba_ceg
    Sep 4, 2015 at 6:29
  • @AdarshKhatri, yes I am.
    – Arthur
    Sep 4, 2015 at 8:31
  • @kuba_ceg, I followed the guide and the rest works fine.
    – Arthur
    Sep 4, 2015 at 8:31

2 Answers 2

1

Is the base getting set correctly? See this line in errors/default/page.phtml

<base href="<?php echo $this->getSkinUrl()?>" />

You may have to modify the/create a new template.

0

Change in index.php file

if (file_exists($maintenanceFile)) { include_once dirname(__FILE__) . '/errors/503.php'; exit; }

when you enable maintenance mode it will redirect to 503.php change it as per your requirement

Change base URL in database core_config_data

3
  • I have changed it to: if (file_exists($maintenanceFile) && !in_array($ip, $allowed)) { include_once dirname(__FILE__) . '/subdirectory_name/errors/503.php'; exit; } Because I have Magento installed in a subdirectory.
    – Arthur
    Sep 4, 2015 at 8:35
  • Is it working now? Sep 4, 2015 at 9:08
  • No. I had this in my code already.
    – Arthur
    Sep 4, 2015 at 11:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.