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

  • are you able to login to admin area? – Adarsh Khatri Sep 4 '15 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 '15 at 6:29
  • @AdarshKhatri, yes I am. – Arthur Sep 4 '15 at 8:31
  • @kuba_ceg, I followed the guide and the rest works fine. – Arthur Sep 4 '15 at 8:31
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.

| improve this answer | |
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

| improve this answer | |
  • 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 '15 at 8:35
  • Is it working now? – Yogesh Trivedi Sep 4 '15 at 9:08
  • No. I had this in my code already. – Arthur Sep 4 '15 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.