Membership is FREE, giving all registered users unlimited access to every Acorn Domains feature, resource, and tool! Optional membership upgrades unlock exclusive benefits like profile signatures with links, banner placements, appearances in the weekly newsletter, and much more - customized to your membership level!

.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...
 
Code:
//Rewrite to www
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^example.com[nc]
RewriteRule ^(.*)$ http://www.example.com/$1 [r=301,nc]
 
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.

The Rule #1

Do not insult any other member. Be polite and do business. Thank you!

Premium Members

New Threads

Domain Forum Friends

Our Mods' Businesses

*the exceptional businesses of our esteemed moderators
General chit-chat
Help Users
  • No one is chatting at the moment.
      There are no messages in the current room.
      Top Bottom