开发者

How to redirect users to another site and allow only bots to index?

I need to redirect all the users to curre开发者_如何学Cnt 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.


I have no idea why you would want to do this legitimately, but, as the question was asked...

# Determine if the User Agent is a Targetted Spider or Bot
SetEnvIfNoCase User-Agent "^Start of the Spider User-Agent String" is_bot
# Add as many lines as are needed here...

# Set the 403 Forbidden location as the Real Visitor Site
ErrorDocument 403 http://www.real-visitors-go-here.com/

# Apply the Targetted Spider or Bot Check to Access
<Limit GET POST>
order deny,allow
deny from all
allow from env=is_bot
</Limit>

Never done it myself, but that kind of makes sense.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜