C
C
Chrome Toaster2019-04-24 09:29:34
htaccess
Chrome Toaster, 2019-04-24 09:29:34

How to add last-modified to a site where everything is on files?

Hi, I came across a site here where everything is roughly speaking on html files (php, but from php there is only include and that's it)
The architecture is as follows:
for example, we turn to the site/contacts.php page
at the root there is a contacts.php file and there it includes a header and footer
How can I add a Last Modified header to the response, and record the last edit of the file there, so that I do not have to insert the last edit definition code into each page (file)?
I tried to insert in htaccess: I
started giving 404 at all

RewriteRule .* - [E=HTTP_IF_MODIFIED_SINCE:%{HTTP:If-Modified-Since}]
RewriteRule .* - [E=HTTP_IF_NONE_MATCH:%{HTTP:If-None-Match}]

Please tell me, I'm sure this can be somehow solved with little bloodshed)

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question