I want to display images on my website( based on php, runs on an apache ), but they are not in a publicly accessible directory, but outside the root directory.
This is how the folder structure looks like:
inc/
public/ <- accessible via webdomain
vault/
/media/
/2021/ <- images are located here
In the folder public is my index.php, here the image should then be output.
My first idea would be to write a php-file, which outputs the content accordingly. It would also be important to me that the actual path of the images is not public.
How would you go about it? What would be the clearest approach?