DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world
PHP For Removing Www From Request And Redirecting. (Useful For System.security.allowDomain Issues)
<?
// if www.domain.com, redirect to domain.com
if (strtolower(substr($_SERVER['HTTP_HOST'], 0, 3)) == "www") {
header("Location: http://rgcreative.com" . $_SERVER['REQUEST_URI']);
}
// Full path to current URL (including query string)
//echo "http://" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
?>





