i have this in my htaccess file and its not redirecting it to www. I have changed the domain to mydomain just to show you. RewriteEngine On RewriteCond %{HTTP_HOST} ^MYDOMIAN\.COM$ [NC] RewriteRule ^(.*)$ http://www.MYDOMAIN.COM/$1 [R=301,L]
Try this: RewriteEngine On RewriteCond %{HTTP_HOST} ^yourdomain.com$ RewriteRule ^(.*)$ "http\:\/\/www\.yourdomain\.com\/$1" [R=301,L] Code (markup): You've got your '\' in all the wrong places
someone please help i have tryed the above and this didnt work either my htaccess file has the above code in and nothing else is the htaccess ment to have a start and finish command
Sounds to me like you don't have mod_rewrite enabled? Also, please don't PM me when I'm already involved with the topic >.< Chuck
hello try this RewriteCond %{HTTP_HOST} !^www.site.com$ RewriteRule ^(.*)$ http://www.site.com/$1 [R=301] Best
RewriteEngine on RewriteCond %{HTTP_HOST} ^yoursitename\.com$ [NC] RewriteRule ^(.*)$ http://www.yoursitename.com/$1 [R=301,L] AddHandler application/x-httpd-php5 .html .htm
RewriteEngine On RewriteCond %{HTTP_HOST} !^www\. RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]