Maintenance Mode Code to display an image on website
-
Hello,
I am trying to put a Maintenance mode page up on my website with an image. I have already created the html file and added an image to it. The issue im having is figuring out the code that goes in the .htaccess file to activate the Maintenance mode. I have tried a lot of codes from online, either I get a white page or nothing happens at all. Here is one of them:
RewriteEngine on
RewriteCond %{REMOTE_ADDR} !^123\.123\.123\.123
RewriteCond %{REQUEST_URI} !\.(jpe?g?|png|gif|css|js|ico)$
RewriteRule !maintenance\.php$ /maintenance/maintenance.php [R=302,L]While using the codes I did not add my ip yet so I could make sure it was operating correctly, and with the code above I replaced the “.php” with “.html” since I made a html file for the maintenance page, I replaced the “(jpe?g?|png|gif|css|js|ico)” with the name of the png image I uploaded to my database, and I changed all of “maintenance” to the name of the maintenance file I created. Also I made sure the image file and html file were both in the same directory as the index.php file because I read that helps. I’m not sure if im coding something wrong, using the wrong code, or if there’s something else going on because I do have a caching plugin on my website and I have read that sometimes caching can cause the problem im having with these codes.
I would appreciate any advice. I am new to adding codes. Thanks in advance.
- You must be logged in to reply to this topic.