Forum Moderators: phranque

Message Too Old, No Replies

Maintenance page with image resources

         

jykabox

8:51 am on Nov 14, 2009 (gmt 0)

10+ Year Member



Hi,

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

jdMorgan

3:54 pm on Nov 14, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You'll need to define the URL-path or filepath to "some logo/images recourses from the local apache" for us if you need help excluding these resources from the RewriteRule...

Jim