- Joined
- Jun 1, 2010
- Posts
- 548
- Reaction score
- 2
I'm having some problems with my .htaccess global redirect. I just want to direct example.com to www.example.com. My usual way of doing this in .htaccess didn't work so I changed it slightly to the suggested code from the hosting company:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^example.com [NC]
RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301]
Is the code alright? Is it possibly something server side stopping it from working? Any help much appreciated, it's not really my forte...
RewriteEngine On
RewriteCond %{HTTP_HOST} ^example.com [NC]
RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301]
Is the code alright? Is it possibly something server side stopping it from working? Any help much appreciated, it's not really my forte...