$UA = $_SERVER["HTTP_USER_AGENT"]; //DoCoMo if(preg_match("/^DoCoMo\/[12]\.0/i", $UA)) { header("location: http://www.h-mother.co.jp/i/i/index.htm"); exit; } //J-PHONE Vodafone SoftBank elseif(preg_match("/^(J\-PHONE|Vodafone|SoftBank|MOT\-[CV])/i", $UA)) { header("location: http://www.h-mother.co.jp/i/v/index.htm"); exit; } //au elseif(preg_match("/^KDDI\-/i", $agent) || preg_match("/UP\.Browser/i", $UA)) { header("location: http://www.h-mother.co.jp/i/ez/index.htm"); exit; } //WILLCOM elseif(preg_match("/^PDXGW/i", $agent) || preg_match("/DDIPOCKET/i", $UA)) { header("location: http://www.h-mother.co.jp/i/i/index.htm"); exit; } //L-mode elseif(preg_match("/^L\-mode/i", $UA)) { header("location: http://www.h-mother.co.jp/i/i/index.htm"); exit; } //PC and etc... header("location: http://www.h-mother.co.jp/i/i/index.htm"); exit; ?>