0

关于:
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]
4

1 回答 1

0

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

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

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

于 2013-09-12T05:52:57.583 回答