Changing image URL from main domain to sub domain

Kayz

Founder license
License owner
👉Fill out this template accordingly with the issue you are experiencing. Add relevant files if needed. 🚧🚦Don't @mention to grab attention. Don't edit the titles of this template.

🎯Description of the issue

I am going to be using external storage for my images. Currently i have thousands of images in date order:

mydomain.com/2019/12/02/myphoto.png - i want to move all the images from that domain to my subdomain

subdomain.mydomain.com/2019/12/02/myphoto.png

So when i delete all the images on the main server from mydomain.com/2019/12/02/myphoto.png anybody who has that url embedded somewhere as am image should still be able to see it embedded and have a working image via subdomain.mydomain.com/2019/12/02/myphoto.png

Does that make sense? I know i can do url re-directs via .htacess but that would require for me to do a lot of lines!
 
Last edited:

Rodolfo

Chevereto Developer
Chevereto Staff
For this kind of issue you have to write a dynamic url redirector. If you have nginx you need a server block, if you use apache you need a htaccess rule.

Please note that our support is for Chevereto issues, which means, stuff caused/triggered by the software. The fact that the system maps these URLs doesn't mean that it is also responsible in how these resolve.

Moved to server issues as your question doesn't qualify for tech support.
 

Kayz

Founder license
License owner
For this kind of issue you have to write a dynamic url redirector. If you have nginx you need a server block, if you use apache you need a htaccess rule.

Please note that our support is for Chevereto issues, which means, stuff caused/triggered by the software. The fact that the system maps these URLs doesn't mean that it is also responsible in how these resolve.

Moved to server issues as your question doesn't qualify for tech support.
Thanks, using apache. If i were to use htaccess rule that would be a lot of lines! Are you able to point me in the right direction of a dynamic htaccess rule which re-directs files according the date in the url? Or maybe without mapping the entire date in the url just add the subdomain when the main url is visited?
 
Top