您的位置:首页 > 其它

域名同一文件路径,不同的域名指向不同的robots文件

2015-03-30 16:25 197 查看
load different robots in the same one "server" block

location ~ /robots.txt
{
if ($host = 'first.domain') {
rewrite ^/robots\.txt /path/to/another/robots.txt last;
}
}

location ~ /robots.txt
{
if ($host ~ .*nfancy.nl) {
rewrite ^/robots\.txt /nl_robots.txt last;
}
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: