I configured Apache to look for a service page and redirect to this page if one is present:
RewriteCond %{DOCUMENT_ROOT}/system/maintenance.html -f
RewriteCond %{SCRIPT_FILENAME} !maintenance.
RewriteRule ^.*$ /system/maintenance.html [L]
This is a pretty standard practice for deploying Ruby on Rails applications.
What I would do is to create a URL list of exceptions to the redirect does not hold for some sub-domains, for example: https://user1.myapp.com/any_request_urlorhttps://user2.myapp.com/any_request_url
Can this be done with additional instructions RewriteCond?
source
share