开发者

Asterisk in robots.txt [closed]

开发者 https://www.devze.com 2022-12-22 23:13 出处:网络
Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed. This question is off-topic. It is not currently accepting answers.

Want to improve this question? Update the question so it's on-topic for Stack Overflow.

Closed 10 years ago.

开发者_如何学Python Improve this question

Wondering if following will work for google in robots.txt

Disallow: /*.action

I need to exclude all urls ending with .action.

Is this correct?


To block files of a specific file type (for example, .gif), use the following:

User-agent: Googlebot
Disallow: /*.gif$

So, you are close. Use Disallow: /*.action$ with a trailing "$"

Of course, that's merely what Google suggests: http://www.google.com/support/webmasters/bin/answer.py?hl=en&answer=156449

All bots are different.


The robots.txt specification provides no way to include wildcards, only the beginning of URIs.

Google implement non-standard extensions, described in their documentation (look in the Manually create a robots.txt file section under "To block files of a specific file type").


I don't think it will work, you would need to move all .action files to a location which you then disallow

0

精彩评论

暂无评论...
验证码 换一张
取 消