reillo / mage_maintenance
用于magento错误和维护模式的简单模板
dev-master
2016-07-25 02:56 UTC
This package is not auto-updated.
Last update: 2024-09-26 02:00:52 UTC
README
这是一个用于magento维护模式的简单模板,允许白名单IP在维护模式下访问网站。
安装
- 下载zip文件
- 在您的magento安装目录中提取文件
- 对于白名单IP地址。替换或备份您的原始
index.php
,然后使用并重命名index.php.simple
为index.php
。 - 或者,在您的
index.php
中插入以下代码以添加白名单IP
/** * Maintenance mode * note! insert me after `define('MAGENTO_ROOT', getcwd());` */ $allowed_ip = array('127.0.0.12', '60.241.193.31'); if (file_exists(MAGENTO_ROOT.'/maintenance.flag') && !in_array($_SERVER['REMOTE_ADDR'], $allowed_ip)) { include_once __DIR__.'/errors/503.php'; exit(); }
许可协议
此项目是开源软件,受MIT许可协议许可。