1
In robots.txt ...允許子目錄索引但子目錄中沒有其他頁面
我想允許目錄的索引或主頁。
/landing/
我不想讓目錄內的任何其他頁面。
/landing/page
/landing/anypage
這怎麼辦?
In robots.txt ...允許子目錄索引但子目錄中沒有其他頁面
我想允許目錄的索引或主頁。
/landing/
我不想讓目錄內的任何其他頁面。
/landing/page
/landing/anypage
這怎麼辦?
User-agent: *
Allow: /landing/$
Disallow: /landing/
據谷歌網站管理員,你可能只需要Allow
指令:
來源:https://developers.google.com/webmasters/control-crawl-index/docs/robots_txt?hl=en#order-of-precedence-for-group-member-records
不允許:/ landing/*應該工作。
我投票關閉這一問題作爲題外話,因爲它屬於https://webmasters.stackexchange.com/ –
@RaymondChen,目前在Stack Overflow上有979個這樣的其他問題(比網站管理員SE多出2倍)。如果你真的相信這個問題應該關閉,你會成爲一個忙碌的傢伙。更重要的是,這是一個編程問題。這是Stack Overflow的用途。 –
這是如何編程?它看起來像網站配置。 –