if($_SERVER["HTTP_HOST"] != 'www.yourdomain.com')
{
if(empty($_SERVER["REQUEST_URI"])) $_SERVER["REQUEST_URI"] = '/';
header('Location: http://www..yourdomain.com' . $_SERVER["REQUEST_URI"], true, 301);
exit();
}
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.yoursite\.com [NC]
RewriteRule ^(.*)$ http://www.yoursite.com/$1 [R=301,L]
RewriteBase /
Category Forum
System Administration - 8Labels
None yet
Statistics
7 participants
Notifications
You are not receiving notifications from this thread.
Related Questions