Posted By

tylerhall on 05/08/07


Tagged

htaccess apache www


Versions (?)

Who likes this?

6 people have marked this snippet as a favorite

jonhenshaw
Roshambo
samuraicoder
basicmagic
vali29
pagetoscreen


Force Website To Not Use WWW Prefix


 / Published in: Other
 

This mod_rewrite rule will force visitors who go to www.domain.com to be redirected to domain.com

  1. RewriteCond %{HTTP_HOST} ^www.domain\.com
  2. RewriteRule ^(.*)$ http://domain.com/$1 [R=permanent,L]

Report this snippet  

Comments

RSS Icon Subscribe to comments
Posted By: jonhenshaw on May 8, 2007

I love this code!

You need to login to post a comment.