【问题标题】:How to use robots.txt to disallow to some controller in Codeigniter如何使用 robots.txt 禁止 Codeigniter 中的某些控制器
【发布时间】:2015-07-06 10:52:08
【问题描述】:

我对 robots.txt 主题很陌生。我看了几个小时并尝试实现它。我有名为 login 和 view 的控制器。我想要的只是谷歌搜索来列出我的视图控制器而不是登录控制器。但是现在当我在 Google 中搜索我的网站时,它会在视图之前显示登录。如何使用 robots.txt 从 Goolge 中列出的登录中删除?

【问题讨论】:

    标签: php html codeigniter seo robots.txt


    【解决方案1】:

    很多关于 robots.txt 的信息你可以在那里找到: http://www.robotstxt.org/robotstxt.html

    简单示例:

    User-agent: *
    Disallow: /test/
    

    使用此代码,所有用户代理都不允许索引“/test/”地址。阅读 robots txt 或向我们展示您的代码。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2013-10-07
      • 2013-01-26
      • 2013-10-07
      • 2013-08-07
      • 2021-04-30
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多