[aklug] Re: .htaccess redirect

From: Royce Williams <royce@alaska.net>
Date: Sun Jul 18 2010 - 16:57:56 AKDT

Shane R. Spencer said, on 07/18/2010 04:26 PM:
> On 07/18/2010 04:21 PM, Christopher Howard wrote:
>> Hey, does anyone know how to write an .htaccess file that would redirect
>> all traffic in a web site directory to the index.html file? I need to
>> have all traffic on one of my web sites redirected to a "Site under
>> maintenance" page for a while.

> I have always ended up setting the error page to a local redir.php which does a proper
> HTTP redirection to index.html

You also want to return a 503 to any bots, and redirect people to the downtime page. You can tack on a Retry-After header if you want the bots to stop pestering you for a few hours. The idea is that you can get mistakenly dropped if you're down too long and get spidered. I think that most bots are smart enough to not drop you unless you're gone for a while, but this may help.

You can pick and choose how you want to go about it here:

http://www.askapache.com/htaccess/503-service-temporarily-unavailable.html

Royce
---------
To unsubscribe, send email to <aklug-request@aklug.org>
with 'unsubscribe' in the message body.
Received on Sun Jul 18 16:58:00 2010

This archive was generated by hypermail 2.1.8 : Sun Jul 18 2010 - 16:58:00 AKDT