如何将用户重定向到另一个网站并仅允许机器人建立索引?
我需要将所有用户重定向到当前的实时站点,并允许机器人为新站点建立索引。 我怎样才能实现这个目标?
如果是用户浏览则重定向到远程站点。
允许机器人索引已开发的站点
示例: 查找domain.com,如果这是一个正在浏览的用户,我将向他发送tom anotherdomain.com 如果是机器人,我让他继续浏览当前网站。
I need to redirect all the users to current live site and allow bots to index the new one.
How can I achieve this?
Redirect to remote site if it is user browsing.
Allow bot to index the devloped site
Example:
domain.com is looked up, if this is a user browsing I send him tom anotherdomain.com
if it is a bot I let him continue browsing current site.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不知道你为什么想要合法地这样做,但是,正如所提出的问题......
我自己从来没有这样做过,但这是有道理的。
I have no idea why you would want to do this legitimately, but, as the question was asked...
Never done it myself, but that kind of makes sense.