I need to add some rewrite rules to a website.
Here's the idea =>
Rewrite all non-subdomain traffic from
(http or https)://(www. or no www.)example.com/whatever
(http or https)://www.example.com/whatever
(so basically, always force www.)
Also rewrite only this 1 sumbdomain =>
(http or https)://(www. or no www.)store.example.com/whatever
(http or https)://www.example.com/whatever
Keep all other subdomains intact.
So far I have this =>
RewriteEngine On
RewriteCond %{HTTP_HOST} ^example.com$
RewriteCond %{HTTP_HOST} ^store.example.com$
RewriteRule ^(.*)$ http%{ENV:askapache}://www.example.com/$1 [R=301,L]
But it's not working as expected...
Any help would be appriciated.
Thanks!!