Welcome, Guest
Username Password: Remember me

Site Not Redirecting to Subdomain
(1 viewing) (1) Guest
  • Page:
  • 1

TOPIC: Site Not Redirecting to Subdomain

Site Not Redirecting to Subdomain 12 years, 4 months ago #6658

  • lwatkins
  • OFFLINE
  • Fresh Boarder
  • Posts: 2
  • Karma: 0
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

Re: Site Not Redirecting to Subdomain 12 years, 4 months ago #6675

  • dryabov
  • OFFLINE
  • Administrator
  • Denis Ryabov, Lead Developer
  • Posts: 4866
  • Karma: 105
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).

Re: Site Not Redirecting to Subdomain 12 years, 4 months ago #6695

  • lwatkins
  • OFFLINE
  • Fresh Boarder
  • Posts: 2
  • Karma: 0
 
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.sitename\.com$
RewriteRule (.*) http://sitename.com/$1 [R=301,L]


Leads to redirect errors.

Re: Site Not Redirecting to Subdomain 12 years, 4 months ago #6696

  • dryabov
  • OFFLINE
  • Administrator
  • Denis Ryabov, Lead Developer
  • Posts: 4866
  • Karma: 105
1. Is it the only redirect rule in .htaccess?
2. What is value of "Domain name" setting on MJ setting page?

Re: Site Not Redirecting to Subdomain 12 years, 3 months ago #7051

  • magics
  • OFFLINE
  • Fresh Boarder
  • Posts: 3
  • Karma: 0
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,
  • Page:
  • 1
Time to create page: 0.14 seconds

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.