{"id":6990,"date":"2017-09-12T15:01:28","date_gmt":"2017-09-12T07:01:28","guid":{"rendered":"http:\/\/rmohan.com\/?p=6990"},"modified":"2017-09-12T15:01:28","modified_gmt":"2017-09-12T07:01:28","slug":"temporary-site-down-notice-in-apache-linux-web","status":"publish","type":"post","link":"https:\/\/mohan.sg\/?p=6990","title":{"rendered":"TEMPORARY \u201cSITE DOWN\u201d NOTICE IN APACHE Linux Web"},"content":{"rendered":"<p> \u201cSite down for maintenance\u201d notice using Apache .htaccess and the mod_rewrite module.<br \/>\nI assume you know how to enable the Apache htaccess directive and the mod_rewrite module.<\/p>\n<p>First you need to create a .htaccess file in your root level of your website.<br \/>\nNext you add the following lines to it<\/p>\n<p>Options +FollowSymlinks<br \/>\nRewriteEngine on<br \/>\nRewriteCond %{REQUEST_URI} !\/sitedown.html$<br \/>\nRewriteRule $ \/sitedown.html [R=302,L]<br \/>\nThe .htaccess file should be \u201cactive\u201d immediately and you should see the content of your sitedown.html file. If not, try clearing your browsers cache.<\/p>\n<p>If you as a maintenance user would like to access the site without seeing the sitedown.html file, add the following line to enable IP address exception<\/p>\n<p>RewriteCond %{REMOTE_HOST} !^192\\.168\\.0\\.12<\/p>\n<p>Remember to replace the IP address with your address.<\/p>\n<p>The .htaccess file should now look something like this.<\/p>\n<p>Options +FollowSymlinks<br \/>\nRewriteEngine on<br \/>\nRewriteCond %{REQUEST_URI} !\/sitedown.html$<br \/>\nRewriteCond %{REMOTE_HOST} !^192\\.168\\.0\\.12<br \/>\nRewriteRule $ \/sitedown.html [R=302,L]<br \/>\nJust delete the .htaccess file when you are done with your maintenance and your site will be available again.<\/p>\n","protected":false},"excerpt":{"rendered":"<p> \u201cSite down for maintenance\u201d notice using Apache .htaccess and the mod_rewrite module. I assume you know how to enable the Apache htaccess directive and the mod_rewrite module.<\/p>\n<p>First you need to create a .htaccess file in your root level of your website. Next you add the following lines to it<\/p>\n<p>Options +FollowSymlinks RewriteEngine on [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12],"tags":[],"_links":{"self":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/6990"}],"collection":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=6990"}],"version-history":[{"count":1,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/6990\/revisions"}],"predecessor-version":[{"id":6991,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/6990\/revisions\/6991"}],"wp:attachment":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=6990"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=6990"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=6990"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}