Membership is FREE – with unlimited access to all features, tools, and discussions. Premium accounts get benefits like banner ads and newsletter exposure. ✅ Signature links are now free for all. Share your own thoughts and experience, accounts may be terminated for violations.

.htaccess global redirect issue

Status
Not open for further replies.
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...
 
Last edited:
Just to update this for anyone reading, .htaccess isn't allowed on a 50webs free account, so not a code issue...
 
Status
Not open for further replies.
Top Bottom