We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Images don't work on subdomain

How Do I?

web-admin's avatar
web-admin
20 posts
9 years ago
web-admin's avatar web-admin

Hi guys,

I have a problem with images on subdomain. I created subdomain (m-test) for mobile version of site and use http://detectmobilebrowsers.com/ for detecting that user connecting by mobile device or desktop. The best option I think would be to use Mobile add-ons for EE3 but this add-ons is for EE2 version only. However idea is the same.

And now, for example, this one works:

https://test.testing.com/images/uploads/folder/image.jpg

but that one not:

https://m-test.testing.com/images/uploads/folder/image.jpg

. So “m-test” subdomain doesn’t have an acces to images. Do I have to set up the paths in index.php file?

Basically I want to create a mobile version of site that uses all content from main domain (all articles, images etc.). Unfortunately the domain “m-test” doesn’t have an access to main domain folders. How to solve it? Or maybe there is a better approach to create a mobile version?

And something else… When I go to “m-test” by desktop that all images are visible (they have path “test.testing.com/images/….”). Unfortunately in mobile they are not visible (probably because “detectmobilebrowsers” script changes {site_url} to “m-test” so path is wrong “m-test.testing.com/images/….”).

I use EE 3.0.4.

Thanks for your help and sorry for - I guess - trivial question!

       
web-admin's avatar
web-admin
20 posts
9 years ago
web-admin's avatar web-admin

What I found out is the code from http://detectmobilebrowsers.com/ for detecting the user-agent creates the issue. So I think it must be modified… Does someone have any experience with this?

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.