[SOLUTION] Forcing the WWW in the address of a site (eg Joomla)
It would appear that addresses both with and without www lead to duplicate content (penalized by google)
And here is not very professional to have a site which can be accessed by:
http://mondomaine . com
and
http://www.mondomaine.com
To force the use of the www and redirect those who do not type the www in the address bar of their browser, it must make a simple redirect by. htaccess located the site root.
Just add this file:
RewriteEngine On RewriteCond% {
HTTP_HOST} ^ monsite.com [NC] RewriteRule ^(.*)$
http://www.monsite.com/ $ 1 [L, R = 301]
If your already contains the htaccess RewriteEngine On, just place the 2 lines below, otherwise (if the instruction RewriteCond RewriteEngine and they will not be interpreted and it will not work.
0 comments:
Post a Comment