• martinpetrov

    (@martinpetrov)


    Could you tell me if the following is correct?

    <?php if(is_404()) { $Error='[client ‘.$_SERVER[‘REMOTE_ADDR’] .’] File does not exist: /path/to/www-root’.$_SERVER[‘REQUEST_URI’];
    if ($_SERVER[‘HTTP_REFERER’]) $Error .=’, referer: ‘.$_SERVER[‘HTTP_REFERER’];
    error_log($Error, 0);} ?>

    Should I change “/path/to/www-root” with my real path ?? ?
    Thanks

Viewing 1 replies (of 1 total)
  • Thread Starter martinpetrov

    (@martinpetrov)

    I also added the 404 header.

    Sorry, my I don’t know anything about php, could please check it:

    <?php if(is_404()) { header(“HTTP/1.1 404 Not Found”); $Error='[client ‘.$_SERVER[‘REMOTE_ADDR’] .’] File does not exist: /path/to/www-root’.$_SERVER[‘REQUEST_URI’];
    if ($_SERVER[‘HTTP_REFERER’]) $Error .=’, referer: ‘.$_SERVER[‘HTTP_REFERER’];
    error_log($Error, 0);} ?>

Viewing 1 replies (of 1 total)
  • The topic ‘is_404() real 404 Error’ is closed to new replies.