Robots件的功能和规范书写

根据您所提供的搜索结果,Robots.txt 文件是一种放置在网站根目录下的纯ASCII文本文件,用于通知搜索引擎哪些页面可以抓取,哪些禁止抓取。该文件的每行记

根据您所提供的搜索结果,Robots.txt 文件是一种放置在网站根目录下的纯ASCII文本文件,用于通知搜索引擎哪些页面可以抓取,哪些禁止抓取。该文件的每行记录由一个字段、一个冒号和一个值组成,标准格式为:field:optional space value optional space #optional comment。其中,User-agent指定本记录用于哪个搜索引擎蜘蛛,Disallow是指定禁止抓取的文件或目录,Allow是指定允许抓取的文件或目录。

在编写Robots.txt 文件时,需要注意以下几点规范:

Robots件的功能和规范书写

  1. 文件名必须为小写的”robots.txt” ,且编码方式应为UTF-8。
  2. User-agent字段用于指定记录所针对的搜索引擎蜘蛛,若值为”*”,则表示适用于所有搜索引擎蜘蛛。
  3. Disallow字段用于指定禁止抓取的文件或目录,若值以”/”开头,则表示禁止抓取该目录下的所有文件;若值不以”/”开头,则表示禁止抓取该具体文件。
  4. Allow字段用于指定允许抓取的文件或目录,通常与Disallow字段配合使用,以便实现允许访问一部分网页同时禁止访问其他所有URL的功能。
  5. 可以使用通配符”

    和来模糊匹配,其中“匹配行结束符,”*”匹配0或多个任意字符。

总之,在编写Robots.txt 文件时,需要遵循上述规范,以便正确地限制搜索引擎蜘蛛的抓取内容。

mjx-container[jax=”SVG”] {
direction: ltr;
}

mjx-container[jax=”SVG”] > svg {
overflow: visible;
min-height: 1px;
min-width: 1px;
}

mjx-container[jax=”SVG”] > svg a {
fill: blue;
stroke: blue;
}

mjx-container[jax=”SVG”][display=”true”] {
display: block;
text-align: center;
margin: 1em 0;
}

mjx-container[jax=”SVG”][display=”true”][width=”full”] {
display: flex;
}

mjx-container[jax=”SVG”][justify=”left”] {
text-align: left;
}

mjx-container[jax=”SVG”][justify=”right”] {
text-align: right;
}

g[data-mml-node=”merror”] > g {
fill: red;
stroke: red;
}

g[data-mml-node=”merror”] > rect[data-background] {
fill: yellow;
stroke: none;
}

g[data-mml-node=”mtable”] > line[data-line], svg[data-table] > g > line[data-line] {
stroke-width: 70px;
fill: none;
}

g[data-mml-node=”mtable”] > rect[data-frame], svg[data-table] > g > rect[data-frame] {
stroke-width: 70px;
fill: none;
}

g[data-mml-node=”mtable”] > .mjx-dashed, svg[data-table] > g > .mjx-dashed {
stroke-dasharray: 140;
}

g[data-mml-node=”mtable”] > .mjx-dotted, svg[data-table] > g > .mjx-dotted {
stroke-linecap: round;
stroke-dasharray: 0,140;
}

g[data-mml-node=”mtable”] > g > svg {
overflow: visible;
}

[jax=”SVG”] mjx-tool {
display: inline-block;
position: relative;
width: 0;
height: 0;
}

[jax=”SVG”] mjx-tool > mjx-tip {
position: absolute;
top: 0;
left: 0;
}

mjx-tool > mjx-tip {
display: inline-block;
padding: .2em;
border: 1px solid #888;
font-size: 70%;
background-color: #F8F8F8;
color: black;
box-shadow: 2px 2px 5px #AAAAAA;
}

g[data-mml-node=”maction”][data-toggle] {
cursor: pointer;
}

mjx-status {
display: block;
position: fixed;
left: 1em;
bottom: 1em;
min-width: 25%;
padding: .2em .4em;
border: 1px solid #888;
font-size: 90%;
background-color: #F8F8F8;
color: black;
}

foreignObject[data-mjx-xml] {
font-family: initial;
line-height: normal;
overflow: visible;
}

mjx-container[jax=”SVG”] path[data-c], mjx-container[jax=”SVG”] use[data-c] {
stroke-width: 3;
}

原创文章,作者:Ur47000,如若转载,请注明出处:https://wyc.retuba.cn/1298.html

(0)
Ur47000Ur47000
上一篇 2024年5月22日 下午1:30
下一篇 2024年5月22日 下午1:30

相关推荐