我只想在一个搜索引擎中获得...
http://mysite.com/indexed, not...
http://mysite.com/index.phpI only want to allow indexing of the main page of the website, and nothing more. I do not want the bot to follow any of the links on the main page.
My meta tags include the following::
<meta name="robots" content="index, nofollow" />
我的 robot.txt 包括以下内容::
User-agent: Googlebot
Allow: /index.php
Disallow: /
User-agent: *
Disallow: /
这会达到我想要的结果吗?
提前致谢!
最佳答案
RewriteCond %{HTTP_HOST} !^www\.example\.com [NC]
RewriteCond %{HTTP_HOST} !^$
RewriteRule ^/(.*) http://www.example.com/$1 [L,R=301]
将其放入 .htaccess。
关于html - 如何在搜索引擎中获取 http ://mysite. com/indexed,而不是 http ://mysite. com/index.php,仅此而已?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3765776/