logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Apache redirection help
Author
kuemerle5



Joined: 08 Jul 2009
Posts: 5

PostPosted: Tue 13 Jul '10 1:37    Post subject: Apache redirection help Reply with quote

Hi all, I just has a quick question (hopefully). Here's the scenario: I am upgrading/redoing my friends website and during maintenance, I would like to display a page to indicate that the website will be offline for an hour or two via a 302 redirect. But, here's the catch: I do not my IP to be redirected to the offline page so I can work on the website without disruption. Is this possible? I would do a deny from all except allow my IP but then I'm afraid about bots being denied and with a 302 direct, I don't think the bots would care much. Any help is greatly appreciated! Thanks guys!
Back to top
glsmith
Moderator


Joined: 16 Oct 2007
Posts: 2268
Location: Sun Diego, USA

PostPosted: Tue 13 Jul '10 5:04    Post subject: Reply with quote

couple ways to do this I'd assume. I would attack the <Directory> container

Code:

<Directory /bla/bla/bla>
  Options whatever
  AllowOverride FileInfo whatever-else

  ErrorDocument 403 /maintenance.html
  Order Deny, Allow
  Deny from all
  Allow from xxx.xxx.xxx.xxx <- your IP
  # because the entire directory is disallowed, allow the
  # maintenance.html file specifically so it doesn't 403 as well
  <Files "maintenance.html">
  Order Allow, Deny
  Allow from all
  </Files>
</Directory>


Should work, but others may have a better way. It will pollute the error log with "client denied access by confuration to /bla/bla/bla"
Back to top
kuemerle5



Joined: 08 Jul 2009
Posts: 5

PostPosted: Thu 15 Jul '10 18:16    Post subject: Reply with quote

Ah, that sounds good. Thank you very much!
Back to top


Reply to topic   Topic: Apache redirection help View previous topic :: View next topic
Post new topic   Forum Index -> Apache