devgeniem / wp-noindex-testing-staging-robots

使用robots.txt防止搜索引擎索引本站的开发/测试环境

1.0.1 2016-10-30 19:02 UTC

This package is auto-updated.

Last update: 2024-09-20 15:10:09 UTC


README

geniem-github-banner

WP MU 插件:隐藏开发/测试环境

Latest Stable Version Total Downloads Latest Unstable Version License

如果通过WP_ENV=stagingWP_ENV=testing访问网站,则通过/robots.txt禁止访问。

如果域名以WP_HIDE_ROBOTS_DOMAINS中提到的域名结尾,也会禁止访问。

安装

$ composer require devgeniem/wp-noindex-testing-staging-robots

示例配置

// hides site from robots if its accessed from any geniem.io or example.com subdomain.
define('WP_HIDE_ROBOTS_DOMAINS','geniem.io,example.com');

维护者

Onni Hakala Liblastic

许可证

MIT