Thread: .htaccess issue
View Single Post
Old 01-12-2012, 07:08 PM   PM User | #1
coolankur49
New to the CF scene

 
Join Date: Jan 2012
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
coolankur49 is an unknown quantity at this point
.htaccess issue

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.

Last edited by coolankur49; 01-12-2012 at 07:49 PM..
coolankur49 is offline   Reply With Quote