RewriteCond: Less than 5 minutes old

Using mod_rewrite I use this to test if a file exists:

RewriteCond /home/myact/public_html/pagecache%{REQUEST_URI}/index.html -f

How can I test if the file exists and is less than 5 minutes old?

As far as I can tell from the manual this is not possible.

You’ll probably need a scripting language (like PHP) to achieve what you want.

Oh, no you don’t! mod_rewrite ONLY works in your webspace and you’re testing a physical location.

The answer to your question, though, is to request the file then read the headers (or simply use a PHP script to see whether the file exists then, if it does, get the timestamp on the file).

In other words, use mod_rewrite for what it’s supposed to be used for rather than try to reinvent it to do work it’s not designed to do. [indent]The best tool to drive a nail is a hammer, not your watch![/indent]
Regards,

DK