Plot: I actually like www URL's but not when used with subdomain like www.whatever.example.com
. First i was using two domains on my hosting account so I added a htaccess rewrite like below code.
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
Motive: Now after sometime I realised that I need a subdomain also pointed to my hosting account. But I don't want a ugly subdomain like www.whatever.example.com
but at the sametime I want to redirect example.com
users to www.example.com
.
I am unable to figure out how to do that. Anyone here.