It is actually a common questions and you find several posts for this (i.e. .htaccess - how to force "www." in a generic way?). But all redirects I tried don't work for me. www. will be added but all parameter will be lost.
mystore.com/store/view/ --> Redirects to ---> www.mystore.com/index.php
mystore.com/product/view/10 --> Redirects to ---> www.mystore.com/index.php
This are some I tried and which supposed to work:
RewriteCond %{HTTP_HOST} !^$
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteCond %{HTTPS}s ^on(s)|
RewriteRule ^ http%1://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
OR
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
Could anyone please point me in the right direction? Thank you so much.