Forum Moderators: phranque
I have found several topics discussing Apache rewrite config for displaying a maintenance page. I'm using apache 2.x as reverse proxy and would like to show maintenance page with some logo/images recourses from the local apache while backend servers are under maintenance. During the break I would like to allow traffic from intranet in order to test the site once maintenance break is over before allowing external users in.
With the following config the error-maintenance.html gets served properly, but I get 403 errors for all images under /maintenance -folder. All suggestions to fix the config are more then welcome!
<Location /maintenance>
# allow access to maintenance image recources
Order allow,deny
allow from all
ProxyPass !
</Location>
RewriteCond %{DOCUMENT_ROOT}/maintenance.break.on -f
RewriteCond %{REQUEST_URI} !^/maintenance(.*)
RewriteCond %{REMOTE_ADDR} !^xx\.xx\.xx\.
RewriteCond %{REMOTE_ADDR} !^yy\.yy\.
RewriteRule ^(.*) /maintenance/errorpage-maintenance.html [L]
Cheers,
Jyri