Extension:NoRobots
From MediaWiki.org
|
Release status: stable |
|
|---|---|
| Implementation | Tag |
| Description | Protect individual pages from being indexed by search engines. |
| Last Version | n/a (2006-03-31) |
| MediaWiki | 1.5 and 1.6 |
| License | No license specified |
| Download | see below |
|
check usage (experimental) |
|
No Robots extension lets you prevent search engines from indexing certain pages on your wiki. If you want to prevent search engines from indexing all pages in your wiki, check out Robots.txt.
[edit] Installation
1. Create a file called extensions/NoRobots.php with these contents:
<?php $wgExtensionFunctions[] = 'noRobots_Install'; function noRobots_Install() { global $wgParser; $wgParser->setHook("norobots", 'noRobots_Render'); } function noRobots_Render($source, $argv) { global $wgOut; $wgOut->setRobotpolicy('noindex,follow'); } ?>
2. Add this to LocalSettings.php:
require_once("extensions/NoRobots.php");
[edit] Usage
Add "<norobots></norobots>" to any page you don't want indexed. That's it!