Enjoy unlimited access to all forum features for FREE! Optional upgrade available for extra perks.

.htaccess global redirect issue

Status
Not open for further replies.
Joined
Jun 1, 2010
Posts
552
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:
Still no joy, could need time to update I guess..?

No if you are typing both the URLs in your browser the redirect would be instant.

PM site details if you want me to take a look.

Admin
 
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!

Featured Services

Sedo - it.com Premiums

IT.com

Premium Members

AucDom
UKBackorder
Be a Squirrel
Acorn Domains Merch
MariaBuy Marketplace

New Threads

Domain Forum Friends

Other domain-related communities we can recommend.

Our Mods' Businesses

Perfect
Service
Laskos
*the exceptional businesses of our esteemed moderators
Top Bottom