httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nick Kew <n...@webthing.com>
Subject Re: [users@httpd] Restricting access to a directory by time of day?
Date Mon, 08 Jan 2007 18:11:20 GMT
On Mon, 8 Jan 2007 08:22:43 -0800 (PST)
Alan Corey <alancorey@yahoo.com> wrote:

> I've searched a little but didn't find anything.
> 
> I'm thinking about putting something online that may use a bit of
> bandwidth, so I'd like to retrict access to times when the office
> isn't open.  Ideally, I'd like to have a page displayed to people who
> try to hit the page explaining the situation.

A module to look up time of day and issue a 503 when the server is
unavailable would be a trivial job.  My book includes a module to
grant access based on date, but that's basically a demo of apache's
AAA framework, and does more than you want.

It should also be possible with mod_rewrite, but that looks much
harder to me, because of the date/time arithmetic.  mod_rewrite
would have to check the time and redirect conditionally to a
503 page.

-- 
Nick Kew

Application Development with Apache - the Apache Modules Book
http://www.apachetutor.org/

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message