On Fri, Jan 03, 2003 at 11:33:45AM -0800, Mike Young wrote: > > Hi, > > I'm new to the list and pretty new to php so please > forgive my ignorance. > > I came across a piece of php code to redirect foreign > countries to a page translated into their language and > I wish to put it on an html page. The page has a > ..htm extension and I don't want to change it to a .php > extension because it's in search engines, traffic > trades etc. But when I put it on my htm page the code > shows. I've pasted the code below, just as I found it. > > My question: How can I make this work, after editing, > on a page with an htm extension without having to > change it to a php extension? > Also , i notice it begins [? and ends ?]. Should that > be <? and ?> instead. I assume it should go in the > body of the page? > > As I said I'm pretty new to php so forgive the > ignorance. Any help would be very much appreciated. > Thanks, > Mike > > > here it is: > > PHP FILTERING CODE [? $user_lan = $HTTP_ACCEPT_LANGUAGE; if($user_lan=='de') { ## German $redir_url = "http://www.germanlanguagepageurl.com"; } elseif($user_lan=='fr') { ## French $redir_url = "http://www.frenchlanguagepageurl.com"; } elseif($user_lan=='it') { ## Italian $redir_url = "http://www.italianlanguagepageurl.com";
} elseif($user_lan=='es') { ## Spain $redir_url = "http://www.spanishlanguagepageurl.com"; ## US traffic or Rest of world not defined above } else { $redir_url = "http://www.yourmainpageurl.com"; } header("Location: $redir_url"); exit; ?] __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com -- PHP Install Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php