Skip to content

Instantly share code, notes, and snippets.

@apermo
Created October 27, 2021 09:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save apermo/10ac2a814b48c139110a68b2f88c7511 to your computer and use it in GitHub Desktop.
Save apermo/10ac2a814b48c139110a68b2f88c7511 to your computer and use it in GitHub Desktop.
Timed redirect MU Plugin for WordPress
<?php
/**
* Plugin Name: Timed redirect
* Description: Redirects all traffic to [hardcoded domain] starting [hardcoded time]
* Version: 1.0.0
* Author: Christoph Daum
*/
// Mind possible UTC time differences here.
if ( time() > mktime( 14, 0, 0, 11, 2, 2021 ) ) {
header("HTTP/1.1 301 Moved Permanently");
header("location: https://www.your-destination.tld/");
exit();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment