Accessing File Modified Date in .htaccess
Asked Answered
E

0

6

Is it possible to get access to file attributes such as when a file was created or last modified?

I have cached gzip files, and would like to be able to set a last-modified header to them. Something like:

<If CLIENT CAN HANDLE GZIP && IN DIRECTORY CACHE/HTML/>
    Header Set Last-Modified {WHEN-FILE-WAS-LAST-MODIFIED}
</If>

Or is there some other way of doing this?

Ellanellard answered 20/1, 2014 at 19:0 Comment(2)
"Or is there some other way of doing this?" Depends, what do you need it for? Basically what is the purpose?Allaallah
I have gzipped files of raw HTML pages - a cache to save my server creating these pages for each request. I'd like to be able to send a Last-Modified header with these gzipped HTML files. I know this could be done with PHP, but I'd rather avoid that.Ellanellard

© 2022 - 2024 — McMap. All rights reserved.