Disable absolute path in WordPress
Posted on: 10 March 2015 /
Categories:
The scripts provided below is used to disable the redirecting of permanentlinks in WordPress
By adding the code below to wp-config.php you can disable the absolute path in WordPress
## Remove absolute path to enable live.domain to redirect to master
$base_path = substr(ABSPATH, strlen($_SERVER['DOCUMENT_ROOT']));
define('WP_SITEURL', "http://${_SERVER['HTTP_HOST']}${base_path}");
define('WP_HOME', "http://${_SERVER['HTTP_HOST']}${base_path}");