Created
October 27, 2021 09:37
-
-
Save apermo/10ac2a814b48c139110a68b2f88c7511 to your computer and use it in GitHub Desktop.
Timed redirect MU Plugin for WordPress
This file contains 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
<?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