Force www. on multi domain site and retain http or https
Posted
by
John Isaacks
on Pro Webmasters
See other posts from Pro Webmasters
or by John Isaacks
Published on 2011-02-09T21:54:49Z
Indexed on
2011/02/09
23:34 UTC
Read the original article
Hit count: 299
I am using CakePHP which already contains an .htaccess
file that looks like:
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^$ app/webroot/ [L]
RewriteRule (.*) app/webroot/$1 [L]
</IfModule>
I want to force www.
(unless it is a subdomain) to avoid duplicate content penalties.
It needs to retain http
or https
Also
This application will have multiple domains pointing to it. So the code needs to be able to work with any domain.
© Pro Webmasters or respective owner