httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rihad <>
Subject [users@httpd] mod_rewrite: time of last modification?
Date Tue, 13 Mar 2007 10:09:44 GMT
Hi, I was wondering if it was possible to use the file's modification 
time (mtime) as a rewrite condition? For example, this is a howto 
snippet presented at 

RewriteCond %{REQUEST_FILENAME}   !-s
RewriteRule ^page\.html$          page.cgi   [T=application/x-httpd-cgi,L]

Here a request to page.html leads to a internal run of a corresponding 
page.cgi if page.html is still missing or has filesize null.

I'm no Unix guru, but is it true that stat() has already been done on 
page.cgi to determine its size with -s? Then I'm guessing it would be 
pretty trivial to use or implement the mtime along the same lines (like 
"if file on disk is older than 30 minutes, then make this a CGI request 
transparently"). This would be plain awesome!

Thanks in advance.

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message