mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
Sometimes PATH_INFO is in there anyway, so this gives us SCRIPT_NAME without relying on mod_rewrite, should be cross-platform.
git-svn-id: https://develop.svn.wordpress.org/trunk@2047 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -10,6 +10,9 @@ header('Cache-Control: no-cache, must-revalidate');
|
|||||||
header('Pragma: no-cache');
|
header('Pragma: no-cache');
|
||||||
|
|
||||||
// If someone has moved WordPress let's try to detect it
|
// If someone has moved WordPress let's try to detect it
|
||||||
|
if ( isset( $_SERVER['PATH_INFO'] ) )
|
||||||
|
$_SERVER['PHP_SELF'] = str_replace( $_SERVER['PATH_INFO'], '', $_SERVER['PHP_SELF'] );
|
||||||
|
|
||||||
if ( dirname('http://' . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF']) != get_settings('siteurl') )
|
if ( dirname('http://' . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF']) != get_settings('siteurl') )
|
||||||
update_option('siteurl', dirname('http://' . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF']) );
|
update_option('siteurl', dirname('http://' . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF']) );
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user