if ($_SERVER[HTTP_HOST]!="www.name.lv"){
header("HTTP/1.1 301 Moved Permanently");
header("Location: http://www.name.lv");
}
if ($_SERVER[HTTP_HOST]!="www.name.lv"){
header("HTTP/1.1 301 Moved Permanently");
header("Location: http://www.name.lv");
}