Simple Search Engine friendly redirection based on the browser language settings

Posted by shote on 02/24/10

   This script can do SEO friendly redirection to language-specific part of the site (subdirectory) based on cookie or the browser language settings.

If you provide "lang" parameter to this script you can force redirection to a specific language version.

Its usefull when you've got a multilingual site and each language is located in its own subdirectory (en, de, fr, ... etc.). The script can be used as an index page and will automatically redirect the visitor to the specific language according to its browser language settings.

The script sets a cookie for later use so if the user returns to the site later, he will be automatically redirected to his preffered language version (the last language version he had visited before)

If no "lang" and the script can't recognize the browser language it will redirect (fallback) to $defaultLang language. Have a look at the script source for more info and example.



Thanks for the post!
Posted by slipkorn on 06/21/10


i am happy to find it thanks for sharing it here. Nice work. .I bookmarked your site!unlock iphone
Posted by unlock iphone on 04/19/10


Thanks a lot for the post!
Posted by Free Samples on 04/09/10


Leave a comment

<<Previous PostNext Post>>
Remove dotted border (outline) around the SWF on Firefox 3 Upcoming site redesign