reillo/mage_maintenance

用于magento错误和维护模式的简单模板

安装次数: 4

依赖关系: 0

建议者: 0

安全性: 0

星标: 0

关注者: 1

分支: 1

公开问题: 0

语言:CSS

类型: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在维护模式下访问网站。

Simple Magento Maintenance Template

安装

  • 下载zip文件
  • 在您的magento安装目录中提取文件
  • 对于白名单IP地址。替换或备份您的原始index.php,然后使用并重命名index.php.simpleindex.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许可协议许可。