LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-22-2005, 05:20 AM   #1
lothario
Member
 
Registered: Apr 2004
Posts: 340

Rep: Reputation: 30
.htaccess problem


I have this setup in the .htaccess file:

Code:
<Directory "/var/www/html/res">
AuthType Basic
AuthName "Restricted"
AuthUserFile /pts/htaccess/.pas
AuthGroupFile /dev/null
require valid-user
Options -Indexes
ErrorDocument 400 /html_errors/index.html
ErrorDocument 401 /html_errors/index.html
ErrorDocument 403 /html_errors/index.html
ErrorDocument 404 /html_errors/index.html

RewriteEngine On
RewriteCond %{TIME_HOUR} ^01|04|08|16|17$
RewriteRule ^.*$ - [F,L]

Order deny,allow
Deny from all
Allow from 192.168.2.100
</Directory>
The only thing that does NOT work is the hour of day restriction section.
Code:
RewriteEngine On
RewriteCond %{TIME_HOUR} ^01|04|08|16|17$
RewriteRule ^.*$ - [F,L]
I want to make sure that access is allowed during 1am, 4am, 8am, 4pm and 5pm.
But this does not work during any time.
I tested it at 1:10am, 1:30am, 4:05am
I keep getting a "HTTP Error 403 - Forbidden"

My ip address is 192.168.2.100
And my id and password are being accepted.

If I remove the 3 Rewrite lines, then everything works fine.

What did I do wrong?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache problem .htaccess fipeso Linux - Networking 2 05-12-2005 11:56 PM
Strange htaccess problem (it ignored!) belorion Linux - Software 2 03-01-2005 02:32 PM
problem getting .htaccess files work wiggywag Slackware 6 02-17-2004 01:21 PM
.htaccess problem Ramon_E Linux - Security 3 10-20-2003 07:32 PM
.htaccess problem mwmethe Linux - Security 1 08-31-2002 12:32 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:07 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration