Puntocom
Well-known member
Hi, if you don't redirect non-www to www (or viceversa), example.com and www.example.com will be different sites with duplicated content and the automatic login will not work.
I have made this modification to my .htaccess file to redirect non-www to www. I searched www redirect and I didn't find this, I hope it helps:
Change:
to:
replacing example.com for your domain name.
I have made this modification to my .htaccess file to redirect non-www to www. I searched www redirect and I didn't find this, I hope it helps:
Change:
Code:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^(data|js|styles|install) - [NC,L]
RewriteRule ^.*$ index.php [NC,L]
</IfModule>
to:
Code:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_HOST} ^example\.com$ [NC]
RewriteRule ^(.*)$ http://www.example.com/$1 [R=301,L]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^(data|js|styles|install) - [NC,L]
RewriteRule ^.*$ index.php [NC,L]
</IfModule>
replacing example.com for your domain name.