禁止使用 1 条指令的不同用途的机器人
Disalow robots for different purpose with 1 Directive
我能否将下面的 2 个指令合并为一个,如下所示,并且 google 或 bing 机器人仍会跟随我的机器人?我最近看到 bingbot 没有遵循第二条指令,我想如果我结合指令他们可能会遵循它。
原创
User-agent:*
Disallow: /folder1/
Disallow: /folder2/
User-agent: *
Disallow: /*.png
Disallow: /*.jpg
想改成这个
User-agent:*
Disallow: /folder1/
Disallow: /folder2/
Disallow: /*.png
Disallow: /*.jpg
您 may only have one 记录 User-agent: *
:
If the value is '*', the record describes the default access policy for any robot that has not matched any of the other records. It is not allowed to have multiple such records in the "/robots.txt" file.
当这些记录中有多个时,机器人(未与更具体的记录匹配)可能只会跟随文件中的第一个。
所以你有使用这条记录:
User-agent: *
Disallow: /folder1/
Disallow: /folder2/
Disallow: /*.png
Disallow: /*.jpg
请注意,Disallow
值中的 *
在原始 robots.txt 规范中没有特殊含义,但一些消费者将其用作通配符。
我能否将下面的 2 个指令合并为一个,如下所示,并且 google 或 bing 机器人仍会跟随我的机器人?我最近看到 bingbot 没有遵循第二条指令,我想如果我结合指令他们可能会遵循它。
原创
User-agent:*
Disallow: /folder1/
Disallow: /folder2/
User-agent: *
Disallow: /*.png
Disallow: /*.jpg
想改成这个
User-agent:*
Disallow: /folder1/
Disallow: /folder2/
Disallow: /*.png
Disallow: /*.jpg
您 may only have one 记录 User-agent: *
:
If the value is '*', the record describes the default access policy for any robot that has not matched any of the other records. It is not allowed to have multiple such records in the "/robots.txt" file.
当这些记录中有多个时,机器人(未与更具体的记录匹配)可能只会跟随文件中的第一个。
所以你有使用这条记录:
User-agent: *
Disallow: /folder1/
Disallow: /folder2/
Disallow: /*.png
Disallow: /*.jpg
请注意,Disallow
值中的 *
在原始 robots.txt 规范中没有特殊含义,但一些消费者将其用作通配符。