Posted By

twobon on 10/29/09


Tagged

modrewrite htaccess


Versions (?)

enforce www


 / Published in: Apache
 

  1. # enable symbolic links, turn rewrite engine on, set base #
  2. Options +FollowSymLinks
  3. RewriteEngine On
  4. RewriteBase /
  5.  
  6. # enforce www #
  7. RewriteCond %{HTTP_HOST} !^www\.domain\.com$ [NC]
  8. RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301,L]

Report this snippet  

You need to login to post a comment.