httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Ruggeri <DRugg...@primary.net>
Subject Re: [users@httpd] simple easy way to turn to maintenance mode
Date Sat, 02 Jun 2012 13:27:01 GMT
On 6/1/2012 11:02 AM, Ishita Kapadiya wrote:
> Daniel's idea looks very good. but what if we also want to verify the
> change by logging into the site (after application level change get
> complete) and then open it up for all users.. is there any way to
> achieve this?

Yes, you can control this with a condition (like looking for a specific
cookie, header or source IP address). In the example below, you would
use a cookie to gain access:

<VirtualHost *:80>
   <IfDefine MAINTENANCE>
      RewriteCond !%{HTTP_COOKIE} LetMeIn
      RewriteRule .* /path/to/maintenance.html [L]
   </IfDefine>

   #Existing directives
</VirtualHost>


-- 
Daniel Ruggeri


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message