Posted By

remysharp on 07/31/07


Tagged

textmate modrewrite www rewriterule


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

Hirmine


no-www


 / Published in: Other
 

  1. # strip www. from the domain
  2. RewriteCond %{HTTP_HOST} ^www\.domain\.com$ [NC]
  3. RewriteRule ^(.*)$ http://domain.com/$1 [R=301,L]
  4.  

Report this snippet  

Comments

RSS Icon Subscribe to comments
Posted By: troynt on February 2, 2009

RewriteCond %{HTTP_HOST} ^www.(.+)$ [NC] RewriteRule ^(.*)$ http://%1/$1 [R=301,L]

You need to login to post a comment.