Difference between revisions of "WordPress Any URL"
From KOP KB
(Created page with "Placing the below code into a wp-config.php file will allow a WordPress site to load properly under any URL that calls it. <syntaxhighlight lang="php" enclose="div"> $metho...") |
(No difference)
|
Revision as of 16:24, 30 March 2018
Placing the below code into a wp-config.php file will allow a WordPress site to load properly under any URL that calls it.
$method = (empty($_SERVER['HTTPS'])) ? 'http://' : 'https://';
define('WP_HOME', $method . $_SERVER['HTTP_HOST']);
define('WP_SITEURL', $method . $_SERVER['HTTP_HOST']);