1

AJAX breaks with htaccess redirection to maintenance page

view story
linux-howto

http://serverfault.com – I run a website that makes use of AJAX. We want to show a "Down for maintenance" static HTML page when we're performing maintenance so users understand what's going on. We also want to let certain IP addresses through without the maintenance page (the people performing the maintenance). To that effect we have these .htaccess rules: %{REQUEST_URI} !/maintenance.html RewriteCond %{REMOTE_HOST} !^subnet\.subnet\.subnet\.subnet RewriteRule $ /maintenance.html [R=302,L] Or this RewriteCond %{REQUEST_URI} !/maintenance.html RewriteCond %{REMOTE_HOST} !^subnet\.subnet\.subnet\.subnet RewriteRule ()