• We all remember SOPA and the other bad thing similar to SOPA? There was a plugin that would blacken out the site and put a logo/text about SOPA.

    There was also an EARTH HOUR that would blacken out your site 8:30pm-9:30pm your local time, less electricity = better enviroment or something like that.

    The Earth Hour plugin hasn’t been maintained since 2013. It blacked out your site at 8:30pm automatically, at 9:30pm it would come back automatically.

    Is there a way to do that? I know I could get a maintenance mode plugin and just pick the design to have a black background. However the auto start and auto finish function wouldn’t be there.

    Is there any way to do the blacken out thing where I can pick the date/time?

Viewing 2 replies - 1 through 2 (of 2 total)
  • If your site is hosted on an Apache/Litespeed server with mod_rewrite running, you can use a RewriteCond variable to show a different page during your blackout period.

    The other thing you could do is create a PHP page called something like “blackout.php” and tell the server (via an .htaccess rule) to visit it first, before WordPress’ index.php to check the time and vary the display via the PHP code.

    You’d be able to set the time either way.

    Just wanted to point out that it might be a good idea to also make sure that a status code of 503 is returned to clients during this hour, so that search engines do not get confused about the status of the content of the web site.

    I’d go ahead with linux4me2’s second suggestion and make sure that the php file returns the 503 status code.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘blacking out your website for specific time’ is closed to new replies.