Apache Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsSystem AdministrationApache Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old February 8th, 2002, 02:00 AM
PentaOne PentaOne is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2002
Posts: 12 PentaOne User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Time Direction with htaccess

Basically I'm trying to forward my site visitors to a maintenance page between 4am and 6am. I've added the lines below to .htaccess but it doesn't work. Any suggestions?

RewriteEngine on
RewriteBase /~quux/
RewriteCond %{TIME_HOUR}%{TIME_MIN} >0400
RewriteCond %{TIME_HOUR}%{TIME_MIN} <0600
RewriteRule ^/~(.+) maintenance.html

Reply With Quote
  #2  
Old February 8th, 2002, 02:50 AM
freebsd freebsd is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Posts: 5 freebsd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Are you sure you need to use RewriteBase?

What's the full system path to your docroot?
And your maintenance.html in full system path and URL path.

Reply With Quote
  #3  
Old February 8th, 2002, 02:57 AM
PentaOne PentaOne is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2002
Posts: 12 PentaOne User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Is that what I am missing? Should I put the full path in?

Reply With Quote
  #4  
Old February 8th, 2002, 03:01 AM
freebsd freebsd is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Posts: 5 freebsd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
No, you tell us those as they are somewhat important to configure your Rewrite rulesets.

Reply With Quote
  #5  
Old February 8th, 2002, 03:07 AM
PentaOne PentaOne is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2002
Posts: 12 PentaOne User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Full path would be:

/home/www/*username*/*domain name*/public_html

Reply With Quote
  #6  
Old February 8th, 2002, 03:10 AM
freebsd freebsd is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Posts: 5 freebsd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
How about maintenance.html (full path and URI)?

Reply With Quote
  #7  
Old February 8th, 2002, 03:18 AM
PentaOne PentaOne is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2002
Posts: 12 PentaOne User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
It's in the public_html folder.

Reply With Quote
  #8  
Old February 8th, 2002, 03:19 AM
freebsd freebsd is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Posts: 5 freebsd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
This is the 3rd and last time, I need to know the FULL URL to maintenance.html.

Reply With Quote
  #9  
Old February 8th, 2002, 03:24 AM
PentaOne PentaOne is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2002
Posts: 12 PentaOne User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Sorry, thought it was clear.

/home/www/*username*/*domain name*/public_html/maintenance.html

Reply With Quote
  #10  
Old February 8th, 2002, 03:30 AM
freebsd freebsd is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Posts: 5 freebsd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
I said URL and full system path. You already provided the full system path but need to know the URL. When your root URI is not under your domain it makes huge difference.
A UserDir account for example, its root URI is http://www.domain.com/~username/ instead of http://www.domain.com/

Reply With Quote
  #11  
Old February 8th, 2002, 03:36 AM
PentaOne PentaOne is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2002
Posts: 12 PentaOne User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Sorry, you know much more than I do.

The path is http://www.domain.com/maintenance.html

~username is not needed.

Reply With Quote
  #12  
Old February 8th, 2002, 03:46 AM
freebsd freebsd is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Posts: 5 freebsd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Then just this:

RewriteEngine on
RewriteCond %{TIME_HOUR}%{TIME_MIN} >0400
RewriteCond %{TIME_HOUR}%{TIME_MIN} <0600
RewriteRule ^(.*) /home/www/username/domainname/public_html/maintenance.html [L]

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationApache Development > Time Direction with htaccess


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
Stay green...Green IT