public RedirectPermanentDomain ( ) |
public function RedirectPermanentDomain()
{
if ($this->option['ZC_PERMANENT_DOMAIN_ENABLE'] == false) {
return;
}
if ($this->option['ZC_PERMANENT_DOMAIN_REDIRECT'] == false) {
return;
}
$host = str_replace(array('https://', 'http://'), array('', ''), GetCurrentHost(ZBP_PATH, $null));
$host2 = str_replace(array('https://', 'http://'), array('', ''), $this->host);
if ($host != $host2) {
$u = GetRequestUri();
$u = $this->host . substr($u, 1, strlen($u));
Redirect301($u);
}
}