Last active
November 14, 2019 09:49
-
-
Save zulhfreelancer/224eb764de53813a3b341bd90d12fbae to your computer and use it in GitHub Desktop.
WordPress maintenance mode for Apache server
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RewriteEngine On | |
RewriteBase / | |
# everyone will see the Maintenance Page except people with IP below | |
RewriteCond %{REMOTE_ADDR} !^xx\.x\.xx\.xxx$ | |
RewriteCond %{REQUEST_URI} !^/maintenance\.html$ | |
RewriteRule ^(.*)$ /maintenance.html [L] | |
# BEGIN WordPress | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteBase / | |
RewriteRule ^index\.php$ - [L] | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteRule . /index.php [L] | |
</IfModule> | |
# END WordPress |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | |
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.2/css/bootstrap.min.css"> | |
<title>Service Temporarily Unavailable</title> | |
<style> | |
body { | |
margin-top: 1rem; | |
} | |
</style> | |
</head> | |
<body class="container"> | |
<div class="row"> | |
<div class="col-md-12"> | |
<h4>Service Temporarily Unavailable</h4> | |
<p>The site is currently being updated. Please try again later.</p> | |
</div> | |
</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment