My .htaccess file that redirects users to a maintenance page but the page is displayed without any of my css styling
My .htaccess file looks like this.
RewriteEngine On
# Redirect to maintenance page unless query parameter supplied
RewriteCond %{QUERY_STRING} !^allowLogin=true$
RewriteCond %{REQUEST_URI} !/maintenance.php$
RewriteRule (.*) https://www.example.com/maintenance.php [R,L]
When the maintenance page is displayed via the .htaccess redirect, it looks like the image below. Notice the empty image and the lack of background color.
With .htaccess redirect
Without the .htaccess file, the page looks like the image below. Notice that the image is now correctly displayed and there is a colored background.
Without .htaccess redirect
The image is loaded by reference to the file containing it.
<img src="assets/img/current-logo.png" width="250px"></a>
The css background command is in a file loaded in the <head> tag
<link rel="stylesheet" href="assets/css/styles.css">
Here is a screenshot of the network tab in my Chrome browser debug tools showing all the calls and responses for the index and maintenance pages. They look OK to me but I’m not familiar enough with that tool to know if there are any problematic issues in it.
Chrome debug network screenshot here
For comparison, the Chrome network axreensghot I remove the .htaccess file is here
I am also seeing errors in the Chrome Console as shown here These errors are in third party tools and do not occur when I remove the .htaccess file.
I should also say this problem is not limited to the maintenance.php file. When I point my browser to any other file in my domain file and include the allowLogin query parameter,they are displayed with the same problems, missing background color and empty images.
Any help much appreciated