我在所有页面的开头都有这个脚本 - 其中包括:
<?php
if (isset($robots) && $robots == "off") {
$robots = '<meta name="robots" content="noindex,nofollow">';
print $robots."\n";
} else {
$robots = '<meta name="robots" content="index,follow">';
print $robots."\n";
}
?>
加载头部后,加载页面的其余部分并设置一个变量。
$机器人=“关闭”;或 $robots="";
我无法在谷歌中获得一个页面来索引。我想知道这是否真的被破坏了,所有页面都设置为 noindex,nofollow。如果我查看源代码,一切看起来都很好。例如,我想要索引的页面有索引、关注和我不想要的页面有 noindex、nofollow。
任何人都可以帮忙吗?