Created
December 7, 2015 14:37
-
-
Save xnite/859565cebd6227855fc5 to your computer and use it in GitHub Desktop.
this conditional statement will modify Wordpress default behavior which redirects users to the primary url for your site. It will prevent this redirection & as long as the address used to access the website ends in `.onion`.
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
if( preg_match( '/\.onion$/', $_SERVER['HTTP_HOST'] ) ) | |
{ | |
define('WP_SITEURL', 'http://' . $_SERVER['HTTP_HOST']); | |
define('WP_HOME', 'http://' . $_SERVER['HTTP_HOST']); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment