<?php
$windows_url = 'http://www.microsoft.com/';
$mac_url = 'http://www.apple.com/';
$other_url = 'http://www.lemonparty.org/';
$user_agent = $_SERVER['HTTP_USER_AGENT'];
if(preg_match('/microsoft|window/i', $user_agent)) {
header("Location: $windows_url", true, 301);
} elseif(preg_match('/mac|os x/i', $user_agent)) {
header("Location: $mac_url", true, 301);
} else {
header("Location: $other_url", true, 301);
}
?>
Nice script, quick question. Why would you want this kind of redirrect ?