博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
robots.txt_robots.txt在开发服务器上重新路由
阅读量:2522 次
发布时间:2019-05-11

本文共 1014 字,大约阅读时间需要 3 分钟。

robots.txt

Every website should have a robots.txt file.  Some bots hit sites so often that they slow down performance, other bots simply aren't desirable.  robots.txt files can also be used to communicate sitemap location and limit request rate.  It's important that the correct robots.txt file is served on development servers though, and that file is usually much different than your production robots.txt file.  Here's a quick .htaccess snippet you can use to make that happen:

每个网站都应该有一个robots.txt文件。 有些漫游器经常访问网站,从而降低性能,而其他漫游器则根本不受欢迎。 robots.txt文件也可以用于传达站点地图位置和限制请求率。 不过,请务必在开发服务器上提供正确的robots.txt文件,并且该文件通常与您的生产robots.txt文件有很大不同。 这是一个快速的.htaccess代码段,您可以使用它来实现此目的:

RewriteCond %{HTTP_HOST} devdomainRewriteRule ^robots.txt$ robots-go-away.txt [L]

The robots-go-away.txt file most likely directs robots not to index anything, unless you want your dev server to be indexed for some reason (hint:  you really don't want this).

robots-go-away.txt文件很可能会指示机器人不对任何内容进行索引,除非您出于某种原因希望对开发服务器进行索引(提示:您确实不希望这样做)。

翻译自:

robots.txt

转载地址:http://zjpwd.baihongyu.com/

你可能感兴趣的文章
Python——交互式图形编程
查看>>
经典排序——希尔排序
查看>>
团队编程项目作业2-团队编程项目代码设计规范
查看>>
英特尔公司将停止910GL、915GL和915PL芯片组的生产
查看>>
团队编程项目作业2-团队编程项目开发环境搭建过程
查看>>
Stax解析XML示例代码
查看>>
cookie
查看>>
二级图片导航菜单
查看>>
<Using parquet with impala>
查看>>
07-Java 中的IO操作
查看>>
uclibc,eglibc,glibc之间的区别和联系【转】
查看>>
Java魔法堂:找外援的利器——Runtime.exec详解
查看>>
mysql数据库存放路径
查看>>
TestNG(五)常用元素的操作
查看>>
解决 Visual Studio 点击添加引用无反应的问题
查看>>
通过镜像下载Android系统源码
查看>>
python字符串格式化 %操作符 {}操作符---总结
查看>>
windows 不能在 本地计算机 启动 Apache
查看>>
iOS开发报duplicate symbols for architecture x86_64错误的问题
查看>>
Chap-6 6.4.2 堆和栈
查看>>