I want to redirect my blog (example.com) to (
www.example.com).
That's simple right, just use the .htaccess rules
Code:
RewriteEngine on
RewriteCond %{HTTP_HOST} !^www\.example\.com
RewriteRule (.*) http://www.example.com/$1 [L,R=301]
NOW THE PROBLEM IS I want to host a mobile version of my blog and I want to use (m.example.com) as the url. But the above .htaccess rules redirect (m.example.com) to (
www.example.com)
ANY IDEA HOW TO AVOID THIS SITUATION.
m.example.com is a CNAME which my wordpress plugin uses to point my blog to mobile theme. It is not a sub-domain.