关于:
网站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]
答案 0 :(得分:0)
我通过添加文件robots.txt
找到了解决方案User-agent: *
Disallow: /
Allow: /project