Results 1 to 2 of 2

Thread: htaccess file active only on specific time range

  1. #1
    Join Date
    Jul 2007
    Posts
    20
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default htaccess file active only on specific time range

    Hi, hope someone can help me:

    I have a htaccess protected password protected directory with

    AuthType Basic
    AuthName "Password"
    AuthUserFile "/home/....."
    require valid-user

    My Question: Is it possible to make a htaccess with password protection which is active only on specific time range?

    If anyone knows ..
    thanks

  2. #2
    Join Date
    May 2014
    Posts
    10
    Thanks
    0
    Thanked 2 Times in 2 Posts

    Default

    I think that you should add the "expr" provider allowing to base authorization decisions on arbitrary expressions. For example this should activate password protection between 8am and 6pm:

    Require expr %{TIME_HOUR} -ge 8 && %{TIME_HOUR} -le 18

Similar Threads

  1. allow access to a HTML page only if the user comes from a specific url with htaccess
    By Marquis in forum Looking for such a script or service
    Replies: 4
    Last Post: 12-31-2013, 05:03 PM
  2. Validate a specific date range
    By deziner76hd in forum JavaScript
    Replies: 5
    Last Post: 05-07-2012, 12:54 AM
  3. Replies: 1
    Last Post: 11-10-2009, 08:21 PM
  4. display different html on speciefied time range
    By Marquis in forum Looking for such a script or service
    Replies: 5
    Last Post: 03-29-2008, 05:57 PM
  5. Selecting a time range
    By Grant Holmes in forum PHP
    Replies: 1
    Last Post: 01-03-2008, 08:12 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •