如何阻止谷歌缓存magento网站?

时间:2012-11-06 07:45:20

标签: magento caching

我试图将no archive命令放入head.phtml文件中,但这不起作用。 这样做的正确方法是什么?

1 个答案:

答案 0 :(得分:1)

尝试在您的web根文件夹或magento文件夹安装中创建一个robot.txt文件并放入

robot.txt文件中的第一个解决方案

User-Agent: *
Disallow: /

.htaccess文件中的第二个解决方案

RewriteEngine on
RewriteCond %{HTTP_USER_AGENT} AltaVista [OR]
RewriteCond %{HTTP_USER_AGENT} Googlebot [OR]
RewriteCond %{HTTP_USER_AGENT} msnbot [OR]
RewriteCond %{HTTP_USER_AGENT} Slurp
RewriteRule ^.*$ "http\:\/\/htmlremix\.com" [R=301,L]

基于文章Block Google and bots using htaccess and robots.txt

的信息