Forum Moderators: coopster
domainargument on the PHP manual page there that describes how you can overcome your issue.
Add code similar to the following to the top of each page (or hopefully you have a global include file you can add this to):
if($_SERVER['SERVER_NAME'] != 'www.example.com'){
header('Location: http'.((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'On')? 's' : '').'://www.example.com'. $_SERVER['REQUEST_URI'], true, 301);
die;
}
I say similar because I just wrote that off the top of my head, so it's completely untested and probably totally wrong. ;)