D
D
Dima_kras2018-11-09 23:18:58
Apache HTTP Server
Dima_kras, 2018-11-09 23:18:58

How can I return the “newest” image from a folder to the Apache server at the request my-site.ru/new.jpg?

Good afternoon. There is a LAMP server, in the img conditional folder there are files with different dates. I want that when my-site.ru/img/new.jpg is requested, the "fresh" picture itself will be displayed. How to do it? In which direction to dig? php? Apache settings?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
toxa82, 2018-11-10
@toxa82

In apache, set up rewrite from the specified url to the php script. And in the script, you look for the desired image and spit it out to the user with the necessary headings.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question