comunic/inc/core/system/checkAllowedHost.inc.php

25 lines
461 B
PHP
Raw Normal View History

2016-11-19 11:08:12 +00:00
<?php
/**
* This file is useful to check we are
* on an allowed host for Comunic
*
* @author Pierre HUBERT
*/
isset($_SESSION) OR exit("Invalid call - ".$_SERVER['PHP_SELF']);
/**
* Getting list of allowed host
*/
include(websiteRelativePath("inc/config/listAllowedHosts.inc.php"));
/**
* Performing security check
*/
if(!in_array($_SERVER['HTTP_HOST'], $liste_allowed_hosts))
{
//On redirige vers l'URL du site
header('location: '.$urlsite);
}