Site Not Redirecting to Subdomain

lwatkins
13 years, 2 months ago
Can't figure out what I am missing. My phone is not displayiing the m subdomain and is displaying the primary domain url.

I have set-up the subdomain m.wealthwisdomandsuccess.com and the following is in my htaccess file:

RewriteEngine On
RewriteCond %{HTTP_HOST} !^sitename\.com$
RewriteRule (.*) sitename/$1 [R=301,L]

RewriteCond %{HTTP_HOST} ^m\.sitename\.com
RewriteRule (.*) ../sitename.com/$1 [L]
I have configured the component to use m.sitename.com for the domain. And redirect is set to no.

My document root for the subdomain is the same as for the primary domain.

After reading the instructions multiple times I can't figure out what I am missing - other than the fact that I am having my www. redirected.

But if I change my htaccess file to...

RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.sitename\.com$
RewriteRule (.*) sitename.com/$1 [R=301,L]

I get web page not available errors.

Any tips?

Thanks so much!

Leisa
dryabov
13 years, 2 months ago
Most likely correct redirect rule reads
 
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.sitename\.com$
RewriteRule (.*) http://sitename.com/$1 [R=301,L]
 

(that is redirect www.sitename.com to sitename.com only and doesn't affect m.sitename.com subdomain).
lwatkins
13 years, 2 months ago
 
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.sitename\.com$
RewriteRule (.*) http://sitename.com/$1 [R=301,L]


Leads to redirect errors.
dryabov
13 years, 2 months ago
1. Is it the only redirect rule in .htaccess?
2. What is value of "Domain name" setting on MJ setting page?
magics
13 years, 1 month ago
Hello User lwatkins,

I can see that your site m.wealthwisdomandsuccess.com
is working okey now.

What measures you took to resolve your error.


Your experience might help us a lot to resolve our issues.

Thanks,

By continuing to use this site you consent to the use of cookies on your device as described in our cookie policy unless you have disabled them. This site will not function correctly without cookies.

I accept cookies from this site.