| Server IP : 62.72.47.131 / Your IP : 216.73.217.34 Web Server : Apache/2.4.66 (Debian) System : Linux 975cdb959a49 5.14.0-611.55.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Tue May 19 15:19:29 EDT 2026 x86_64 User : ( 501) PHP Version : 8.3.30 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /proc/thread-self/cwd/wp-content/mu-plugins/ |
Upload File : |
<?php
/**
* Keep login/admin redirects on the public production domain.
*/
const KC_CANONICAL_HOST = 'www.keeratiponuroclinic.com';
const KC_OLD_HOST = 'www.keeratiponuroclinic.com';
function kc_canonicalize_url_host($url) {
if (!is_string($url) || $url === '') {
return $url;
}
return str_replace(
[
'http://' . KC_OLD_HOST,
'https://' . KC_OLD_HOST,
'http://keeratiponuroclinic.com',
'https://keeratiponuroclinic.com',
'http://localhost:8000',
'https://localhost:8000',
],
'http://' . KC_CANONICAL_HOST,
$url
);
}
add_action('login_init', static function () {
foreach (['redirect_to', 'reauth'] as $key) {
if (isset($_GET[$key]) && is_string($_GET[$key])) {
$_GET[$key] = kc_canonicalize_url_host($_GET[$key]);
}
if (isset($_POST[$key]) && is_string($_POST[$key])) {
$_POST[$key] = kc_canonicalize_url_host($_POST[$key]);
}
if (isset($_REQUEST[$key]) && is_string($_REQUEST[$key])) {
$_REQUEST[$key] = kc_canonicalize_url_host($_REQUEST[$key]);
}
}
});
add_filter('login_redirect', static function ($redirect_to) {
return kc_canonicalize_url_host($redirect_to);
}, 1);
add_filter('wp_safe_redirect_fallback', static function ($fallback_url) {
return kc_canonicalize_url_host($fallback_url);
}, 1);