Created
March 10, 2016 19:28
-
-
Save molotovbliss/f398c0ac9168da20cf4d to your computer and use it in GitHub Desktop.
Bypass Maintenance Mode in Magento with custom HTTP_USER_AGENT
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Overwrite the maintenance change in index.php file conditional with the follow, using a more unique User Agent is recommended. | |
Chrome/Firefox/etc. most browsers offer means via extensions or development tools to set a customer User Agent. Utliziing this | |
you can bypass the maintance mode for Testing when you don't have a Static IP: | |
# If user agent is "QA" bypass maintenance mode (customize user agent for more uniqueness) | |
if (file_exists($maintenanceFile) && $_SERVER['HTTP_USER_AGENT'] != "QA") { | |
include_once dirname(__FILE__) . '/errors/503.php'; | |
exit; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment