Posted By

graceman9 on 09/29/13


Tagged

htaccess


Versions (?)

Redirect all users to access the site WITHOUT the 'www.' prefix


 / Published in: Apache
 

Redirect all users to access the site WITHOUT the 'www.' prefix

  1. # redirect all users to access the site WITHOUT the 'www.' prefix
  2. RewriteCond %{HTTP_HOST} ^www\.example\.com$ [NC]
  3. RewriteRule ^(.*)$ http://example.com/$1 [L,R=301]

Report this snippet  

You need to login to post a comment.