Diff for Metafox/cfgldr.inc.php between version 1.3 and 1.4
| version 1.3, 2006/07/09 09:26:05 |
version 1.4, 2006/08/14 10:15:17 |
| Line 241 if (intval(@$ezin_cfg['debug']) == 0) { |
|
| Line 241 if (intval(@$ezin_cfg['debug']) == 0) { |
|
| } |
} |
| |
|
| /* |
/* |
| * Mandatory HTTP host check |
|
| */ |
|
| |
|
| if (strlen($ezin_cfg['http_host_redirect']) > 0 && strcasecmp($_SERVER['REQUEST_METHOD'], 'POST')) { |
|
| $ezin_http_host = strtolower($_SERVER['HTTP_HOST']); |
|
| $ezin_redirect_url = @parse_url(Platon::append_slash($ezin_cfg['http_host_redirect'])); |
|
| if (strlen($ezin_redirect_url['scheme']) <= 0) { |
|
| $ezin_redirect_url = @parse_url( |
|
| (strcasecmp($_SERVER['HTTPS'], 'on') ? 'http' : 'https') |
|
| .'://'.Platon::append_slash($ezin_cfg['http_host_redirect'])); |
|
| } |
|
| if (strlen($ezin_redirect_url['host']) > 0 && strlen($ezin_http_host) > 0 |
|
| && strcasecmp($ezin_redirect_url['host'], $ezin_http_host)) { |
|
| $ezin_http_host_allowed_ar = preg_split('|\s+|', $ezin_cfg['http_host_allowed']); |
|
| $ezin_http_host_forbidden_ar = preg_split('|\s+|', $ezin_cfg['http_host_forbidden']); |
|
| if (count($ezin_http_host_forbidden_ar) <= 0 |
|
| || in_array($ezin_http_host, $ezin_http_host_forbidden_ar)) { |
|
| if (! in_array(strtolower($_SERVER['HTTP_HOST']), $ezin_http_host_allowed_ar)) { |
|
| $ezin_redirect_url['path'] .= Platon::str_replace_prefix( |
|
| Platon::append_slash($ezin_cfg['url']), '', $_SERVER['REQUEST_URI']); |
|
| Platon::redirect(Platon::glue_url($ezin_redirect_url)); |
|
| } |
|
| } |
|
| } |
|
| } |
|
| |
|
| /* |
|
| * Redirect test |
* Redirect test |
| */ |
*/ |
| |
|
Platon Group <platon@platon.org> http://platon.org/
|
|