Manual:$wgDefaultRobotPolicy/zh
From Linux Web Expert
<translate> Robot policies</translate>: $wgDefaultRobotPolicy | |
---|---|
Allows specifying the default robot policy for all pages on the wiki |
|
<translate> Introduced in version:</translate> | 1.12.0 (r30602) |
<translate> Removed in version:</translate> | <translate> still in use</translate> |
<translate> Allowed values:</translate> | (text string appropriate for a "robots" meta tag) |
<translate> Default value:</translate> | 'index,follow' |
<translate> Other settings:</translate> <translate> Alphabetical</translate> | <translate> By function</translate> |
详情
Allows specifying the default robot policy for all pages on the wiki. The default is to encourage indexing and following of links. This can be overridden on a per-namespace and/or per-article basis.
例如:
$wgDefaultRobotPolicy = 'noindex,nofollow';
$wgNamespaceRobotPolicies = [
NS_MAIN => 'index,follow'
];
would forbid indexing and following of links on all pages outside the main namespace.
参见
外部链接
- About the Robots <META> tag (www.robotstxt.org)