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

来源:互联网 发布:海岛奇兵科技升级数据 编辑:程序博客网 时间:2024/05/21 09:18


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;                 }        }

0 0
原创粉丝点击