I am currently using the script below to redirect search engines(not users):
<?php
if (preg_match("#(google|slurp@inktomi|yahoo! slurp|msnbot)#si", $_SERVER['HTTP_USER_AGENT'])) {
header("HTTP/1.1 301 Moved Permanently");
header("Location: http://new-location.com");
exit;
}
?>
All I want to do is reverse the script so that users are redirected and not bots....I know I could just use the "if not equal to" in the script above....but I want ALL bots to not be redirected....not just the search engines. Basically something like the script below.
<?php
if (preg_match("#(ANY USER THAT IS NOT A BOT)#si", $_SERVER['HTTP_USER_AGENT'])) {
[COLOR="orange"]//Obviously replace the "ANY USER THAT IS NOT A BOT" with a script that actually works.[/COLOR]
header("HTTP/1.1 301 Moved Permanently");
header("Location: http://new-location.com");
exit;
}
?>
So yeah, if you can edit that script in a way that it would actually work, that would be fantastic!:w00t: Thanks a bunch!


Sign In
Create Account

Back to top









