SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Evangelist
    Join Date
    Feb 2000
    Location
    England
    Posts
    568
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I am making a 404 error page in php. The idea is it reports the error to the user and then emails me the link the person was trying to access but does not exist. I can't however seem to get the link they tried to access.

    I tried

    <php>
    $referer = getenv("HTTP_REFERER");
    </php>

    but it always just churns back http://www.ascifi.com/404.php which is the location of the php script. All the scripts at hotscripts seemed to do the same.

    Any suggestions?

  2. #2
    AdSpeed.com Son Nguyen's Avatar
    Join Date
    Aug 2000
    Location
    Silicon Valley
    Posts
    2,241
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    try $REQUEST_URI instead
    - Son Nguyen
    AdSpeed.com - Ad Serving and Ad Management Made Easy

  3. #3
    SitePoint Evangelist
    Join Date
    Feb 2000
    Location
    England
    Posts
    568
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    oops i made a mistake.

    $referer = getenv("HTTP_REFERER");

    gives the url of the page i was on before i clicked on a link that is dead. So if www.domain.com/index.php exists but i click on a link to www.domain.com/index2.php that is the dead link then unfortunatly it is index.php that is listed

    $referer2 = getenv("REQUEST_URI");

    just gives 404.php


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •