WordPress Any URL

From KOP KB
Revision as of 16:24, 30 March 2018 by Agoodyer (talk | contribs) (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...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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']);