apache

How to enforce www

In order to enforce a given site to be served through a domain with www, follow this procedure

1. Create a .htaccess file at the base of the drupal installation directory
2. Set the following code

  RewriteCond %{HTTP_HOST} .
  RewriteCond %{HTTP_HOST} !^www\. [NC]
  RewriteRule ^ http%{ENV:protossl}://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
Subscribe to RSS - apache