I am using a PHP script to serve files.
I would like to be able to send back a 304 not modified header in my http response if the file has not changed since the client last downloaded it. This seems to be a feature in Apache (and most other web servers), but I have no clue how this can be implemented through PHP.
I $_SERVER['HTTP_IF_MODIFIED_SINCE'] kullanarak duymuş, ama bu değişken benim $_SERVER süper dizide görünmesini görünmüyor.
Sorum 304 başlığı dönmek, ama nasıl bir iade edilmesi gerektiğini bilmek nasıl değildir.
Edit: Sorun benim $_SERVER['HTTP_IF_MODIFIED_SINCE'] ayarlanmış olmasıdır. Bu benim .htaccess dosyanın içeriği:
ExpiresActive On
ExpiresByType image/jpeg "modification plus 1 month"
ExpiresByType image/png "modification plus 1 month"
ExpiresByType image/gif "modification plus 1 month"
Header append Cache-Control: "must-revalidate"
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond $1 !^(controller\.php)
RewriteRule (.*\.jpg|.*\.png|.*\.gif) controller.php/$1
</IfModule>
HTTP_IF_MODIFIED_SINCE hala $_SERVER süper dizide görünmüyor.