If I type mysite.com/myproduct-name or mysite.it/myproduct-name without www it brings me to the respective homepage (I have 2 domains: www.mysite.com and www.mysite.it).
.htaccess part:
RewriteCond %{HTTP_HOST} !^mysite.it$ [NC]
RewriteRule ^(.*)$ http://www.mysite.it/ [R=301,L]
# RewriteCond %{HTTP_HOST} !^mysite.com$ [NC]
# RewriteRule ^(.*)$ http://www.mysite.com/ [R=301,L]
SetEnvIf Host www\.mysite\.com MAGE_RUN_CODE=en
SetEnvIf Host ^mysite\.com MAGE_RUN_CODE=en
SetEnvIf Host www\.mysite\.it MAGE_RUN_CODE=it
SetEnvIf Host ^mysite\.it MAGE_RUN_CODE=it
- In this situation redirect of product is resolved but I can access only to www.mysite.it
- If I uncomment row 3 and 4 I'm not able to access both domains anymore.
- If I remove ! from both conditions I can access to both domains but redirect to www product page doesn't work anymore
How can set it so that redirect me to the www version of the content (e.g. www.mysite.com/myproduct-name)?