- This topic has 2 replies, 2 voices, and was last updated 7 years, 3 months ago by Chris Bellew.
January 21, 2013 at 11:26 pm #754Chris BellewGuest
I have a wordpress site set up on Amazon EC2, and I’m having trouble getting the mobile theme switcher to work properly. I have the site set up on multiple instances, behind a load balancer, at http://www.domain.com (just an example). I also have an apache directive that causes the browser to be redirected to http://www.domain.com/* when going to domain.com/* (this is the way I had to set it up – domain.com points to a single instance, while http://www.domain.com points to the load balancer, which has that instance plus 1 or more instances behind it).
Now, most of the time I try to visit the site from a mobile device, to http://www.domain.com, it serves the desktop version. However, when I temporarily comment out the apache directive so that I can visit domain.com instead, it loads the mobile version just fine, every time. Occasionally it does load the mobile version from http://www.domain.com, but it is very sporadic and rare.
I thought it might have something to do with the auto-launched extra instances behind the load balancer, but even after terminating those, it still behaves the same way.
I also checked the mysql options table and it does indeed define the site as being http://www.domain.com/. Any ideas?
I realize the load balancer thing sounds kind of weird, but I’m pretty sure I ruled that out as being the culprit.January 25, 2013 at 3:11 am #819DineshKeymaster
can you could send me your site link via contact form ?February 1, 2013 at 6:49 am #884Chris BellewGuest
Thanks for your help. We figured out that the problem was due to page cacheing from the W3TC plugin. Disabling it fixed the problem.
- The topic ‘Working for domain.com but not www.domain.com’ is closed to new replies.