#astuce sécurité PHP - Le Hollandais Volant #http://lehollandaisvolant.net/?mode=links&id=20160319122329 # en début de script if (basename($_SERVER['SCRIPT_NAME']) === 'index.php' and strpos(parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH), 'index.php') === FALSE ) { $var_request_URI = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH).'index.php'; } else { $var_request_URI = $_SERVER['REQUEST_URI']; } if (parse_url($var_request_URI, PHP_URL_PATH) !== $_SERVER['SCRIPT_NAME']) { header('Location: '.$_SERVER['SCRIPT_NAME']); }