1

我试图通过我的 htaccess 文件阻止几个机器人。在 Search Engine Watch 上,建议使用以下内容。我确实在 robots.txt 文件中阻止了这些机器人,但他们忽略了它。

以下是搜索引擎观察的代码:

RewriteEngine on 
Options +FollowSymlinks 
RewriteBase / 
RewriteCond %{HTTP_USER_AGENT} ^Baiduspider [NC,OR” 
RewriteCond %{HTTP_USER_AGENT} ^Sogou
RewriteRule ^.*$ - [F”

我当前的 htaccess 文件如下。我将如何使用上面的代码修改我当前的 .htaccess ?我要添加什么以及在哪里添加上述内容?我假设上面的一些内容已经包含在我当前的 htaccess 文件中,不需要重复。

这是我当前的 .htaccess:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

   # END WordPress
4

1 回答 1

4
于 2013-02-19T00:03:07.360 回答