forked from unitoo/configurations
15 lines
623 B
Text
15 lines
623 B
Text
<VirtualHost *:443>
|
|
# Redirect all request to a 503 return code when in maintenance mode
|
|
ErrorDocument 503 /maintenance/index.html
|
|
RewriteEngine on
|
|
RewriteCond /var/www/maintenance/ALL -f [OR]
|
|
RewriteCond /var/www/maintenance/%{SERVER_NAME} -f
|
|
RewriteCond %{REQUEST_URI} !=/maintenance/index.html
|
|
RewriteCond %{REQUEST_URI} !=/maintenance/index.png
|
|
RewriteRule ^ - [R=503,L]
|
|
|
|
# Redirect away from the maintenance page if not in maintenance mode
|
|
RewriteCond /var/www/maintenance/ALL !-f
|
|
RewriteCond /var/www/maintenance/%{SERVER_NAME} !-f
|
|
RewriteRule ^/maintenance/index.html$ / [R,L]
|
|
</VirtualHost>
|