Simple and quick one 🙂 Just to rewrite non www traffic to www in Apache you can use the following snippet
RewriteCond %{HTTP_HOST} !^www\. [NC] RewriteRule ^(.*)$ %{REQUEST_SCHEME}://www.%{HTTP_HOST}$1 [R=301,L]
Simple and quick one 🙂 Just to rewrite non www traffic to www in Apache you can use the following snippet
RewriteCond %{HTTP_HOST} !^www\. [NC] RewriteRule ^(.*)$ %{REQUEST_SCHEME}://www.%{HTTP_HOST}$1 [R=301,L]