Created
August 12, 2021 14:35
-
-
Save Tmeister/3dd901b8c47f5fe041c6531c1306d442 to your computer and use it in GitHub Desktop.
WordPress response to different domains
This file contains hidden or 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 | |
if(isset($_SERVER['HTTP_HOST'])){ | |
define('CUSTOM_REQUEST_URL', ($_SERVER['HTTPS'] ? 'https://' : 'http://') . $_SERVER['HTTP_HOST']); | |
define('WP_SITEURL', CUSTOM_REQUEST_URL); | |
define('WP_HOME', CUSTOM_REQUEST_URL); | |
} | |
/* That's all, stop editing! Happy publishing. */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment