Thanks to forgiving server-configurations it usually doesn’t matter whether you access a website via the fully qualified URL including “www” or without it - requests to http://codemassacre.com and www.codemassacre.com are taking you to the same place. After all you want to make it as easy as possible for people to access your website, so being forgiving is important.
However, as soon as you try to secure your site with help of a secure certificate and the corresponding https protocol, you need to pay closer attention, and, ultimately, make a choice as to which domain name the certificate applies to, because it will be either with www, or without.
Specifically, requesting https://some-domain.com for a site that only has a certificate for https://www.some-domain.com will cause your browser to raise a warning about an invalid certificate and block the site - certainly not a trust-invoking impression to give a potential customer! (unfortunately I am speaking first hand here, hehehe
So, long story short, here’s an .htaccess entry that forces all requests to your site to have a www at the beginning:
RewriteEngine On RewriteCond %{HTTP_HOST} ^some-domain.com RewriteRule (.*) http://www.some-domain.com/$1 [R=301,L]
What’s happening here is that we’re watching the HTTP_HOST server variable for anything that starts with “some-domain.com”. The ^ signifies the beginning of a string. If this condition is fulfilled, we rewrite any request (.*) to the fully qualified url, and we append whatever was matched by the (.*) part - which goes into the $1 variable. Lastly, we set the R=301 flag to tell the client browsers that this redirect is permanent. The L is for good taste to make sure this is the last rule applied to this request (no point in applying any other rules..).
Now requests to https://some-domain.com will be redirected to https://www.some-domain.com, the certificate matches, and the browser is happy - and so is whoever visited your site, because as we all know “ignorance is bliss”
Добрый вечер! mason@sportbul.ru” rel=”nofollow”>……
С уважением,…
Trackback by Konstantin — June 19, 2010 @ 9:27 am
Buy:Cialis Professional.Super Active ED Pack.Cialis Soft Tabs.Cialis.Maxaman.Viagra Soft Tabs.Viagra Super Force.Viagra Super Active+.Cialis Super Active+.Levitra.Tramadol.VPXL.Soma.Viagra Professional.Zithromax.Propecia.Viagra….
Trackback by MELVIN — July 21, 2010 @ 4:58 am
Buy:Petcam (Metacam) Oral Suspension.Nexium.Human Growth Hormone.Lumigan.Arimidex.Zovirax.100% Pure Okinawan Coral Calcium.Accutane.Synthroid.Prednisolone.Actos.Valtrex.Mega Hoodia.Retin-A.Prevacid.Zyban….
Trackback by WENDELL — September 7, 2010 @ 4:09 pm
…
BUY FASHION. TOP BRANDS: GUCCI, DOLCE&GABBANA, BURBERRY, DIESEL, ICEBERG, ROBERTO CAVALLI, EMPORIO ARMANI, VERSACE…
Trackback by JOSEPH — November 10, 2010 @ 11:19 pm
Abilify@official.site” rel=”nofollow”>.…
Buywithout prescription…
Trackback by ARTURO — December 20, 2010 @ 1:55 am
symbicort vs advair…
Buyno prescription…
Trackback by GUY — December 22, 2010 @ 4:07 am
Risperdal@official.site” rel=”nofollow”>..…
Buynow it…
Trackback by ANDREW — January 7, 2011 @ 9:01 am
Verapamil…
Buygeneric drugs…
Trackback by CHRIS — February 3, 2011 @ 12:10 pm
alternative for warfarin medication…
Buynow…
Trackback by KYLE — February 6, 2011 @ 1:43 am
zoloft works…
Buygeneric pills…
Trackback by PAUL — March 3, 2011 @ 6:00 pm
Vitamin E…
Buygeneric drugs…
Trackback by CLINTON — March 3, 2011 @ 10:42 pm
claritin eye drops…
Buygeneric drugs…
Trackback by MIGUEL — March 6, 2011 @ 6:16 am
singulair hyper…
Buygeneric drugs…
Trackback by GILBERT — March 7, 2011 @ 11:39 pm
Prozac…
Buygeneric meds…
Trackback by CHESTER — March 9, 2011 @ 12:43 am
buy orlistat alli…
Buygeneric drugs…
Trackback by PETER — March 9, 2011 @ 2:48 pm
Skelaxin@Skelaxin.Skelaxin” rel=”nofollow”>..…
Buyit now…
Trackback by CARL — March 29, 2011 @ 5:38 pm
Cytoxan@Cytoxan.Cytoxan” rel=”nofollow”>..…
Buydrugs without prescription…
Trackback by JAIME — March 30, 2011 @ 4:37 pm
Provera@Provera.Provera” rel=”nofollow”>……
Buydrugs without prescription…
Trackback by ALLEN — March 31, 2011 @ 3:47 am
Seroquel@Seroquel.Seroquel” rel=”nofollow”>……
Buydrugs without prescription…
Trackback by ALBERT — March 31, 2011 @ 3:08 pm
……
Buygeneric drugs…
Trackback by DAN — April 2, 2011 @ 11:05 am
celexa@and.mda” rel=”nofollow”>……
Buygeneric drugs…
Trackback by JACOB — April 2, 2011 @ 7:00 pm
claritin@helps.poison.ivy” rel=”nofollow”>……
Buydrugs without prescription…
Trackback by TERRY — April 3, 2011 @ 1:20 am
difference@between.medrol.and.prednisolone” rel=”nofollow”>……
Buywithout prescription…
Trackback by IVAN — April 3, 2011 @ 6:16 pm
prozac@and.diflucan.drug.interactions” rel=”nofollow”>……
Buygeneric drugs…
Trackback by DAN — April 4, 2011 @ 5:28 am
aloe@vera.gel.benefits” rel=”nofollow”>.…
Buyit now…
Trackback by THOMAS — April 4, 2011 @ 12:26 pm
arava@institute.for.enviornmental.studies.dr.elaine.solowey” rel=”nofollow”>..…
Buynow…
Trackback by RICK — April 5, 2011 @ 5:45 am
best@ay.to.take.extenze” rel=”nofollow”>……
Buyit now…
Trackback by ROLAND — April 5, 2011 @ 8:15 am
femara@and.hives” rel=”nofollow”>..…
Buyno prescription…
Trackback by FRANCISCO — April 5, 2011 @ 5:18 pm
livingston@foot.care.bellmore” rel=”nofollow”>.…
Buyit now…
Trackback by KURT — April 6, 2011 @ 11:16 am
Buy@Cheap.Abana” rel=”nofollow”>..…
Buygeneric pills…
Trackback by EDUARDO — July 29, 2011 @ 2:56 am
Purchase@Abilify.Online” rel=”nofollow”>……
Buywithout prescription…
Trackback by PERRY — July 29, 2011 @ 11:49 am
Buy@Generic.Abilify.5mg.10mg.15mg.20mg.30mg” rel=”nofollow”>……
Buywithout prescription…
Trackback by ROY — July 29, 2011 @ 6:40 pm
Purchase@Discount.Acai” rel=”nofollow”>..…
Buywithout prescription…
Trackback by RUSSELL — July 30, 2011 @ 2:35 pm
Buy@Acai.Without.Prescription” rel=”nofollow”>……
Buynow…
Trackback by SALVADOR — July 30, 2011 @ 8:35 pm
Buy@Cheap.Coral.Calcium” rel=”nofollow”>.…
Buynow it…
Trackback by EDUARDO — July 31, 2011 @ 11:51 am
Buy@Cheap.Coral.Calcium” rel=”nofollow”>……
Buygeneric meds…
Trackback by RONALD — July 31, 2011 @ 10:17 pm
Cheap@Coral.Calcium.Online” rel=”nofollow”>..…
Buygeneric drugs…
Trackback by DUSTIN — August 1, 2011 @ 1:18 am
Order@Discount.Abana” rel=”nofollow”>..…
Buygeneric meds…
Trackback by SALVADOR — August 1, 2011 @ 4:09 am
Buy@Abilify.Online” rel=”nofollow”>..…
Buynow it…
Trackback by LEWIS — August 1, 2011 @ 6:41 am
Buy@Cheap.Abilify” rel=”nofollow”>……
Buygeneric pills…
Trackback by LESLIE — August 2, 2011 @ 8:23 pm
Cheap@Abilify.Without.Prescription” rel=”nofollow”>..…
Buyno prescription…
Trackback by BRANDON — August 3, 2011 @ 5:21 am
Order@Accupril.Online” rel=”nofollow”>.…
Buygeneric drugs…
Trackback by BOB — August 5, 2011 @ 1:11 pm
Buy@Discount.Accutane” rel=”nofollow”>.…
Buynow it…
Trackback by BYRON — August 6, 2011 @ 12:33 am
.…
Buygeneric drugs…
Trackback by LOUIS — August 6, 2011 @ 12:05 pm
Order@Cheap.Actos” rel=”nofollow”>.…
Buygeneric drugs zfk…
Trackback by RAY — August 11, 2011 @ 3:31 am
Get@Actos.Online” rel=”nofollow”>..…
Buywithout prescription dyo…
Trackback by LAWRENCE — August 11, 2011 @ 7:21 am
Actos@15mg.30mg.Without.Prescription” rel=”nofollow”>..…
Buygeneric meds qmo…
Trackback by CLIFTON — August 12, 2011 @ 12:55 am
Buy@Cheap.Accupril” rel=”nofollow”>.…
Buygeneric drugs nih…
Trackback by BRYAN — August 15, 2011 @ 6:41 pm
Cheap@Accutane.10mg.20mg” rel=”nofollow”>.…
Buyit now ojb…
Trackback by VINCENT — August 17, 2011 @ 2:28 pm
Order@Aciphex.Online” rel=”nofollow”>.…
Buynow it lmg…
Trackback by MARVIN — August 18, 2011 @ 1:43 am
Order@Discount.Aciphex” rel=”nofollow”>……
Buygeneric meds svb…
Trackback by JOHNNY — August 18, 2011 @ 4:07 am
Cheap@Advair.Without.Prescription” rel=”nofollow”>……
Buyit now sge…
Trackback by BERNARD — August 23, 2011 @ 10:23 pm
Buy@Cheap.Aggrenox” rel=”nofollow”>..…
Buygeneric meds dxy…
Trackback by ALVIN — August 24, 2011 @ 3:08 pm
Buy@Cheap.Aldactone” rel=”nofollow”>..…
Buydrugs without prescription hak…
Trackback by RAUL — August 25, 2011 @ 8:26 pm
can@you.take.aciphex.and.nexium.at.the.same.time” rel=”nofollow”>..…
Buygeneric pills…
Trackback by BRAD — August 26, 2011 @ 8:11 am
actonel@and.heart.irregularities” rel=”nofollow”>..…
Buyno prescription…
Trackback by DARRYL — August 26, 2011 @ 8:07 pm
aldactone@kidney.problems” rel=”nofollow”>……
Buygeneric drugs…
Trackback by MELVIN — August 27, 2011 @ 12:59 am
actonel@and.dvt” rel=”nofollow”>.…
Buygeneric meds…
Trackback by CLINTON — August 28, 2011 @ 10:27 am
levaquin 500mg…
Buy_no prescription…
Trackback by EVERETT — October 16, 2011 @ 9:57 pm
financial aid for alzheimer’s…
Buy_without prescription…
Trackback by ALBERT — October 20, 2011 @ 9:01 am
heart worm medication…
Buy_no prescription…
Trackback by TODD — October 20, 2011 @ 5:20 pm
blood pressure medications…
Buy_now it…
Trackback by ANTONIO — October 21, 2011 @ 10:12 pm
hepatitis b shot…
Buy_it now…
Trackback by BARRY — October 25, 2011 @ 5:52 pm
drug trafficking in latin america…
Buy_drugs without prescription…
Trackback by DAN — October 26, 2011 @ 2:16 am
permanent removal of adult acne scars…
Buy_generic meds…
Trackback by LAWRENCE — October 29, 2011 @ 2:46 am
enhancement drugs…
Buy_no prescription…
Trackback by KENNY — October 30, 2011 @ 6:15 am
drug test company…
Buy_without prescription…
Trackback by TERRENCE — October 30, 2011 @ 5:48 pm
social etiologies for patients with schizophrenia…
Buy_it now…
Trackback by JACOB — October 31, 2011 @ 10:30 am
epson salt and lemon juice diet…
Buy_generic pills…
Trackback by ERIC — November 2, 2011 @ 9:13 am
l91 energizer e2 lithium aa cells…
Buy_generic drugs…
Trackback by BRYAN — November 2, 2011 @ 2:09 pm
how to buy glucose meter…
Buy_generic meds…
Trackback by JOEY — November 3, 2011 @ 3:32 am
skin cancer foundation australia…
Buy_generic drugs…
Trackback by JEREMY — November 3, 2011 @ 9:17 am
clinical features of sickle cell disease…
Buy_generic drugs…
Trackback by CHRIS — November 4, 2011 @ 7:39 pm
depression medcine xr…
Buy_drugs without prescription…
Trackback by JEFFERY — November 6, 2011 @ 3:19 am
school age adhd self absorbed…
Buy_now it…
Trackback by CHARLIE — November 8, 2011 @ 9:31 am
meal plan for hypertension…
Buy_generic drugs…
Trackback by NATHAN — November 11, 2011 @ 3:51 pm
scabies in dogs help…
Buy_generic drugs…
Trackback by RAFAEL — November 12, 2011 @ 3:12 pm
herbals for pregnancy…
Buy_drugs without prescription…
Trackback by ALFRED — November 13, 2011 @ 2:53 am
diet secrets for models…
Buy_now it…
Trackback by WESLEY — November 16, 2011 @ 7:29 pm
best@medicare.plan.d.for.nexium.40.mg” rel=”nofollow”>..…
Buygeneric meds…
Trackback by JEREMY — December 11, 2011 @ 9:12 am
infant@prevacid.dose” rel=”nofollow”>.…
Buygeneric drugs…
Trackback by HARRY — December 11, 2011 @ 1:33 pm