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']; ?>