PHP Developers Network

A community of PHP developers offering assistance, advice, discussion, and friendship.
 
Loading
It is currently Thu Sep 19, 2019 12:40 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Mon Jun 15, 2009 3:54 pm 
Offline
DevNet Evangelist

Joined: Tue Dec 21, 2004 6:00 pm
Posts: 6267
Location: Winnipeg
I have a web site where you can access it as either 'www' or without...Ideally I would like the .htaccess code required to force a redirect to one or the other -- preferably the 'www' prefix variety.

Cheers,
Alex


Top
 Profile  
 
PostPosted: Mon Jun 15, 2009 5:40 pm 
Offline
Briney Mod
User avatar

Joined: Mon Jan 19, 2004 7:11 pm
Posts: 6446
Location: 53.01N x 112.48W
This stuff is all over Google.

_________________
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.


Top
 Profile  
 
PostPosted: Tue Jun 16, 2009 7:45 am 
Offline
DevNet Evangelist

Joined: Tue Dec 21, 2004 6:00 pm
Posts: 6267
Location: Winnipeg


Top
 Profile  
 
PostPosted: Fri Aug 14, 2009 6:12 pm 
Offline
Forum Newbie

Joined: Fri Jul 17, 2009 1:15 am
Posts: 18
This is what I am using for my domain:

RewriteCond %{HTTP_HOST} ^amrita-rao.in$ [OR]
RewriteCond %{HTTP_HOST} ^www.amrita-rao.in$
RewriteRule ^/?$ "http\:\/\/www\.amrita\-rao\.in" [R=301,L]

_________________
AccuWebHosting.Com - Windows VPS Hosting
ASP.NET 3.5 | SQL 2005 Database | US Based Hosting Company | 24 X 7 Support | Daily Backups | Uptime Guarantee | Affiliates - $50 Per Sale |
|


Top
 Profile  
 
PostPosted: Sat Aug 15, 2009 9:43 pm 
Offline
Forum Regular

Joined: Thu Dec 18, 2003 4:58 pm
Posts: 836


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group