I set up a maintenance page for my site so when users visit, they are returned with the 503 status and redirected to a custom maintenance.php page. So it works fine and I can clearly see in my browsers that it is properly returning 503 as long as I manually enter URL's in my search address bar.
The issue is if someone clicks a link to certain pages from a Referrer, let's say from Facebook, it will redirect them to the maintenance.php page but for some reason it fails to load the CSS files and images associated with it. The CSS files and images suddenly return a 503 status as well.
My site by default will also redirect "http" pages to use "https" and "www". If I run the same page in just "http", the CSS files and images will load.
Then, if I run the page in "https" with no "www" in the URL, the page will load the CSS files and images.
So it seems as long as "https" and "www" are both in the URL, the page, its' CSS files, and its' images will all return 503.
My 503 status is configured in my .htaccess file:
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REMOTE_ADDR} !^123\.45\.67\.89$
RewriteCond %{DOCUMENT_ROOT}/maintenance.php -f
RewriteCond %{DOCUMENT_ROOT}/maintenance.enable -f
RewriteCond %{SCRIPT_FILENAME} !maintenance.php
RewriteRule ^.*$ /maintenance.php [R=503,L]
ErrorDocument 503 /maintenance.php
Header Set Cache-Control "max-age=0, no-store"
The server is running Apache. Is there a configuration I can use that will make sure the CSS files and images load when someone clicks a link that includes "https" and "www" in the URL?
Edit: It also seems the pages with this issue do not have their URL's redirect to maintenance.php either. Although they still display the maintenance.php content despite this.