0

I have main installation of EE3 (test.example.com) and subdomain (m-test.example.com) for mobile version. Also I use detectmobilebrowser.com for detecting the device. Everything work well despite images. Mobile version will have the same content, images etc. as main version.

So this URL works: test.example.com/images/upload/folder/image.jpg but this one unfortunately not: m-test.example.com/images/upload/folder/image.jpg. Templates are loading properly but without images.

I found out the problem has been created by detectmobilebrowser.com because without this the images work properly on subdomain (m-test.example.com). So the problem is starting when someone go to test.example.com by mobile and will be redirected to m-test.example.com. Then images not working. When you go to m-test.example.com by desktop, everything will be fine.

What is the reason of that and how to deal with it?

Thanks for help!

2
  • Where in your load order do you redirect? PHP via templates or perhaps right in index.php or the JS version on the front-end? Also, have you tried using your browsers mobile emulator, and then investigation your non-loading image elements?
    – jrothafer
    May 19, 2016 at 15:23
  • I detected the device by server (nginx). I think the problem was when server detect the mobile version, change the address and then images didn't load. Anyway thanks for your answer.
    – Bosmi
    May 20, 2016 at 7:43

1 Answer 1

1

I change the way of making mobile version of site. I'm going to stay at the same URL and use Mobile Detect script (http://mobiledetect.net/) in my templates. So I do not have to create a new subdomain and detect device by server. To be honest, this is something I was looking for.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.