I'm using .htaccess to redirect
ErrorDocument 404 http://www.xxxxx.com/404.php
In the 404.php file :
echo $SERVER["REQUEST_URI"]; shows /404.php
echo $SERVER["REDIRECT_URL"]; shows nothing
print_r($_SERVER); shows (I've x'd out sensitive values but there was no value that showed the url I typed to create the 404)
Array ( [PATH] => /xxxx/xxxxx/bin:/usr/bin:/bin [UNIQUE_ID] => xxxxxxxxxxxxxxxxxxxxxx [MvCONFIG_LIBRARY] => /xxxx/xxxxx/miva/lib/config/env.so [MvCONFIG_DIR_BUILTIN] => /xxxx/xxxxx/miva/lib/builtins [MvCONFIG_DIR_CA] => /xxxx/xxxxx/miva/certs [MvCONFIG_SSL_OPENSSL] => /xxxx/xxxx/libssl.so [MvCONFIG_SSL_CRYPTO] => /xxxx/xxxx/libcrypto.so [MvCONFIG_DIR_MIVA] => /home/sites/xxxxxx/xxxxxxxx [MvCONFIG_DIR_DATA] => /home/sites/xxxxxx/mivadata [HTTP_ACCEPT] => image/gif, image/jpeg, image/pjpeg, image/pjpeg, application/msword, application/vnd.ms-powerpoint, application/vnd.ms-excel, application/xaml+xml, application/vnd.ms-xpsdocument, application/x-ms-xbap, application/x-ms-application, application/x-shockwave-flash, / [HTTP_ACCEPT_LANGUAGE] => en-gb [HTTP_USER_AGENT] => Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; Sky Broadband; GTB6; .NET CLR 1.0.3705; .NET CLR 1.1.4322; Media Center PC 4.0; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 3.0.4506.2152; .NET CLR 3.5.21022; .NET CLR 3.5.30729) [HTTP_ACCEPT_ENCODING] => gzip, deflate [HTTP_HOST] => xxx.xxxxxx [HTTP_CONNECTION] => Keep-Alive [HTTP_COOKIE] => utma=xxxxxxxxx.xxxxxxxxx.1278195231.1278195231.1278197885.2; utmz=126015128.1278195231.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); comm100_33155=2; hcl_chatid=1; hcl_nick=xxxx; PHPSESSID=xxxxxx[SERVER_SIGNATURE] =>
Apache/2 Server at xxx.xxxxxx Port 80
[SERVER_SOFTWARE] => Apache/2 [SERVER_NAME] => xxx.xxxxxx [SERVER_ADDR] => xx.xxx.xx.xx [SERVER_PORT] => 80 [REMOTE_ADDR] =>xx.xxx.xx.xx [DOCUMENT_ROOT] => /home/sites/xxxxxx/xxxxxxxxx/ [SERVER_ADMIN] => webmaster@xxxxxx [SCRIPT_FILENAME] => /home/sites/xxxxxx/xxxxxxxx/404.php [REMOTE_PORT] => 1828 [GATEWAY_INTERFACE] => CGI/1.1 [SERVER_PROTOCOL] => HTTP/1.1 [REQUEST_METHOD] => GET [QUERY_STRING] => [REQUEST_URI] => /404.php [SCRIPT_NAME] => /404.php [PHP_SELF] => /404.php [argv] => Array ( ) [argc] => 0 )