Whoops \ Exception \ ErrorException (E_WARNING)
Undefined array key "HTTP_ACCEPT_LANGUAGE" Whoops\Exception\ErrorException thrown with message "Undefined array key "HTTP_ACCEPT_LANGUAGE"" Stacktrace: #2 Whoops\Exception\ErrorException in /data/sites/web/belgiumgtrstorecom/www/lang.php:3 #1 Whoops\Run:handleError in /data/sites/web/belgiumgtrstorecom/www/lang.php:3 #0 require in /data/sites/web/belgiumgtrstorecom/www/index.php:97
Stack frames (3)
2
Whoops\Exception\ErrorException
/lang.php3
1
Whoops\Run handleError
/lang.php3
0
require
/index.php97
/data/sites/web/belgiumgtrstorecom/www/lang.php
<?php
$known_langs = array('nl','en');
$user_pref_langs = explode(',', $_SERVER['HTTP_ACCEPT_LANGUAGE']);

foreach($user_pref_langs as $idx => $lang) {
    $lang = substr($lang, 0, 2);
    if (in_array($lang, $known_langs)) {
        switch ($lang) {
            case 'nl':
                header('location: /NL');
                die();
                break;
            case 'en':
                header('location: /EN');
                die();
                break;
        }
    } else {
        header('location: /EN');
        die();
    }
}
/data/sites/web/belgiumgtrstorecom/www/lang.php
<?php
$known_langs = array('nl','en');
$user_pref_langs = explode(',', $_SERVER['HTTP_ACCEPT_LANGUAGE']);

foreach($user_pref_langs as $idx => $lang) {
    $lang = substr($lang, 0, 2);
    if (in_array($lang, $known_langs)) {
        switch ($lang) {
            case 'nl':
                header('location: /NL');
                die();
                break;
            case 'en':
                header('location: /EN');
                die();
                break;
        }
    } else {
        header('location: /EN');
        die();
    }
}
/data/sites/web/belgiumgtrstorecom/www/index.php
$router->map('GET','/EN/liberty-walk', 'content/EN/libertywalk-file.php', 'liberty-walk-EN');
$router->map('GET','/EN/events', 'content/EN/events-file.php', 'events-EN');
$router->map('GET','/EN/services', 'content/EN/services-file.php', 'services-EN');
$router->map('GET','/EN/services/', 'content/EN/services-file.php', 'services-EN-trailing');
$router->map('GET','/EN/services/[*:action]', 'content/EN/services-file.php', 'services-specific-EN');
$router->map('GET','/EN/contact', 'content/EN/contact-file.php', 'contact-EN');
$router->map('GET','/EN/forsale', 'content/EN/forsale-file.php', 'forsale-EN');
$router->map('GET','/EN/merchandise', 'content/EN/merchandise-file.php', 'merchandise-EN');
$router->map('GET','/EN/termsofuse', 'content/EN/termsofuse.php', 'termsofuse-EN');
$router->map('GET','/EN/privacypolicy', 'content/EN/privacypolicy.php', 'privacypolicy-EN');

$router->map('GET', '*', '404.php', '404');

$match = $router->match();

// call closure or throw 404 status
if( $match && is_callable( $match['target'] ) ) {
    call_user_func_array( $match['target'], $match['params'] );
} elseif($match) {
    require $match['target'];
}else {
    header( $_SERVER["SERVER_PROTOCOL"] . ' 404 Not Found');
    exit(); // terminate the script
}

Environment & details:

empty
empty
empty
empty
empty
Key Value
USER belgiumgtrstorecom
HOME /data/sites/web/belgiumgtrstorecom/
SCRIPT_NAME /index.php
REQUEST_URI /
QUERY_STRING
REQUEST_METHOD GET
SERVER_PROTOCOL HTTP/1.1
GATEWAY_INTERFACE CGI/1.1
REMOTE_PORT 14938
SCRIPT_FILENAME /data/sites/web/belgiumgtrstorecom/www/index.php
SERVER_ADMIN support@webhosting.be
CONTEXT_DOCUMENT_ROOT /data/sites/web/belgiumgtrstorecom/www
CONTEXT_PREFIX
REQUEST_SCHEME https
DOCUMENT_ROOT /data/sites/web/belgiumgtrstorecom/www
REMOTE_ADDR 34.228.7.237
SERVER_PORT 443
SERVER_ADDR 5.134.7.114
SERVER_NAME derooverperformance.com
SERVER_SOFTWARE Apache
SERVER_SIGNATURE
LD_LIBRARY_PATH /data/jail/usr/local/httpd-2.4-worker/lib:/data/jail/usr/local/openssl/lib
PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
HTTP_USER_AGENT claudebot
HTTP_ACCEPT */*
HTTP_X_SCHEME https
HTTP_X_HCL_FORWARDED_PORT 443
HTTP_X_HCL_FORWARDED_PROTO https
HTTP_X_REAL_IP 34.228.7.237
HTTP_HOST derooverperformance.com
proxy-nokeepalive 1
SCRIPT_URI https://derooverperformance.com/
SCRIPT_URL /
LOGPREFIX user_belgiumgtrstorecom
UNIQUE_ID ZflKXAr98cjPYSd0xQBLaQAAAIU
HTTPS on
FCGI_ROLE RESPONDER
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1710836316.7679
REQUEST_TIME 1710836316
empty
0. Whoops\Handler\PrettyPageHandler