手册:$wgDefaultRobotPolicy

This page is a translated version of the page Manual:$wgDefaultRobotPolicy and the translation is 36% complete.
机器人方针: $wgDefaultRobotPolicy
Allows specifying the default robot policy for all pages on the wiki
引进版本:1.12.0 (r30602)
移除版本:仍在使用
允许的值:(text string appropriate for a "robots" meta tag)
默认值:'index,follow'

详情

This configuration parameter allows specifying the default robot policy for all pages on the wiki. The default is to encourage link indexing and following. This can be overridden on a per-namespace and/or per-article basis.

The following example would forbid the indexing and following links on all pages outside the main namespace:

$wgDefaultRobotPolicy = 'noindex,nofollow';
$wgNamespaceRobotPolicies = [
     NS_MAIN => 'index,follow'
];

参见

外部链接