36
36
//try to get website by domain to serve specific 403 page
37
37
$domain = @parse_url($_SERVER['REQUEST_URI'], PHP_URL_HOST) ? @parse_url($_SERVER['REQUEST_URI'], PHP_URL_HOST) : (@parse_url($_SERVER['HTTP_HOST'], PHP_URL_HOST) ? @parse_url($_SERVER['HTTP_HOST'], PHP_URL_HOST) : $_SERVER['HTTP_HOST']);
39
40
$website = CMS_websitesCatalog::getWebsiteFromDomain($domain);
40
41
if ($website && !$website->hasError()) {
41
42
//check if website has a 403 page defined