View Single Post
Old 10-03-2010, 08:53 AM  
fris
Too lazy to set a custom title
 
fris's Avatar
 
Industry Role:
Join Date: Aug 2002
Posts: 54,937
Quote:
Originally Posted by Darrell View Post
Thanks for all the replies. Based on language is a good idea.

My sites are in English and I only want to pop a warning page for one country and based on the browser language would be fine. Also I don't want to mess up my SE rankings. Is there a really simple way to accomplish this?
Code:
<?php 
$lang = ($_SERVER['HTTP_ACCEPT_LANGUAGE']); 

if(preg_match("zh", $lang)) { 
    header("location: http://www.domain.com/china.html"); 
} else { 
    header("location: http://domain.com/"); 
} 
?>
__________________
Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.


WP Stuff
fris is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote