【问题标题】:.htaccess close for search engines whole site, except some urls (kohana).htaccess 关闭搜索引擎整个网站,除了一些 url (kohana)
【发布时间】:2013-09-11 06:39:07
【问题描述】:

关于:
kohana 中的站点,版本 3.0.8。

问题:
我想关闭整个网站的搜索引擎,除了
baseinvest.kz/project 及其内页(baseinvest.kz/project/view/110)

.htaccess 文件

RewriteEngine On
RewriteBase /
<Files .*>
Order Deny,Allow
Deny From All
</Files>
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
RewriteRule ^(?:application|modules|system)\b.* index.php/$0 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !=/favicon.ico
RewriteCond %{REQUEST_URI} !=/robots.txt
RewriteRule .* index.php [L]

【问题讨论】:

    标签: php .htaccess indexing search-engine kohana


    【解决方案1】:

    我通过添加文件 robots.txt 找到了解决方案

    User-agent: *
    Disallow: /
    Allow: /project
    

    本站分析http://tools.seobook.com/robots-txt/analyzer/

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-10-07
      • 2011-02-18
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-02-02
      相关资源
      最近更新 更多