Extension:NoRobots
From MediaWiki.org
|
|
This extension stores its code inside a wiki page. Please be aware that MediaWiki developers do not review or keep track of extensions that put their code on the wiki.
|
|
No Robots 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!
