Login
Join
About us
News
Docs
/
Redirect non WWW urls to WWW using just .htaccess
Redirect non WWW urls to WWW using just .htaccess
This is a simple rule for .htaccess to redirect all non www urls to www. ``` RewriteCond %{HTTP_HOST} !^www\\. [NC] RewriteRule ^(.*)$ <http://www>.%{HTTP_HOST}/$1 [R=301,L] ```