我希望从Googlebot阻止特定文件夹及其所有内容。
该文件夹将被称为/ folder /,我将把它放在根目录/
中我在这里有这个:
RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} (googlebot|bingbot|Baiduspider) [NC]
RewriteRule .* - [R=403,L]
我试图将最后一行更改为:
RewriteRule ^/folder(.*)?$ - [R=403,L]
但它不起作用
答案 0 :(得分:3)
没有/
:
RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} (googlebot|bingbot|Baiduspider) [NC]
RewriteRule ^folder - [F,L]