Forum Moderators: coopster
FYI it was a refresh based on a url if statment.
<?php if ($_SERVER['HTTP_HOST'] != "www.example.com") {
header("HTTP/1.1 301 Moved Permanently");
header("Location: http://www.example.com".$_SERVER['REQUEST_URI']);
exit;
}
else {
// normal page headers
};
?> The above sends a 301 Permanent redirect if the URL isn't the www. version (or is anything else), but retaining the full URL details from after the domain name.