You get a bonus - 1 coin for daily activity. Now you have 1 coin

The Last-Modified header is not sent from any file on the hosting, including a test one

Practice



------------------------------------------
<?php

$LastModified = gmdate("D, d M Y H:i:s \G\M\T", time());
header('Last-Modified: '.$LastModified);

------------------------------------------------------

as a result, only the following headers are present:

Cache-Control: max-age=0
Connection: keep-alive
Content-Encoding: gzip
Content-Type: text/html; charset=UTF-8
Date: Mon, 07 May 2018 06:50:24 GMT
Expires: Mon, 07 May 2018 06:50:24 GMT
Server: nginx
Transfer-Encoding: chunked
Vary: Accept-Encoding
X-Powered-By: PHP/5.6.30
X-UA-Compatible: IE=edge
__________________________________
how do I make this header appear?

Last-Modified6587: for example, this kind of header is sent. and on other hosting providers this header is sent

Comments

Alex 09-05-2018
у меня была похожая история на хостинге reg.ru.
после того как отключили на хостинге reg.ru
ssi для домена, заголовок стал успешно передаваться.

Проверить его я смог по этой ссылке:
https://last-modified.com/ru/if-modified -since.html

Также заголовок я проверил при запросе скрипта через curl:

curl -I https://сайт/test.php

HTTP/1.1 200 OK
Server: nginx
Date: Mon, 07 May 2018 07:23:06 GMT
Content-Type: text/html; charset=UTF-8
Connection: keep-alive
Vary: Accept-Encoding
X-Powered-By: PHP/5.6.30
Last-Modified: Mon, 07 May 2018 07:23:06 GMT
Cache-Control: max-age=0
Expires: Mon, 07 May 2018 07:23:06 GMT
Vary: Accept-Encoding
X-UA-Compatible: IE=edge

To leave a comment

If you have any suggestion, idea, thanks or comment, feel free to write. We really value feedback and are glad to hear your opinion.
To reply

Lectures and tutorial on "Running server side scripts using PHP as an example (LAMP)"

Terms: Running server side scripts using PHP as an example (LAMP)