1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Custom 404 Help

Discussion in 'PHP' started by TwisterMc, Mar 9, 2005.

  1. #1
    I created a custom 404.php file and it's linked up and working. What I need now is for the error to email to me and I'm having issues. I've looked around and tried a few things and I keep getting the errors mailed to me, however I'm not getting the URL that they requested. The emails keep saying that people requested 404.php when they actually requested ss.htm which redirected to the custom 404 page.

    How can I get the missing page emailed to myself?

    Can anyone help me?
     
    TwisterMc, Mar 9, 2005 IP
  2. palespyder

    palespyder Psycho Ninja

    Messages:
    1,254
    Likes Received:
    98
    Best Answers:
    0
    Trophy Points:
    168
    #2
    are you using htaccess or some other method?
     
    palespyder, Mar 9, 2005 IP
  3. TwisterMc

    TwisterMc Mac Guru

    Messages:
    972
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    0
    #3
    in the htacccess i put

    ErrorDocument 404 http://www.cant-say-website.com/404.php
     
    TwisterMc, Mar 9, 2005 IP
  4. palespyder

    palespyder Psycho Ninja

    Messages:
    1,254
    Likes Received:
    98
    Best Answers:
    0
    Trophy Points:
    168
    #4
    found this on a blog Twister, try this.

    Might try that, This is how I did mine.
     
    palespyder, Mar 9, 2005 IP
  5. palespyder

    palespyder Psycho Ninja

    Messages:
    1,254
    Likes Received:
    98
    Best Answers:
    0
    Trophy Points:
    168
    #5
    palespyder, Mar 9, 2005 IP
  6. ResaleBroker

    ResaleBroker Active Member

    Messages:
    1,665
    Likes Received:
    50
    Best Answers:
    0
    Trophy Points:
    90
    #6
    TwisterMC, here is a link for Dynamic Error Pages.
     
    ResaleBroker, Mar 9, 2005 IP
  7. sarahk

    sarahk iTamer Staff

    Messages:
    28,500
    Likes Received:
    4,460
    Best Answers:
    123
    Trophy Points:
    665
    #7
    You've probably got the answer from the other posts but ... your 404 page is a PHP page so you're on the right track.

    If you var_dump($_SERVER); you will see that its an array with lots of info. Quite where the requested page is may vary from server to server but you'll find it easy peasy.

    Then just build the string you want emailed to you using \n and \t for new lines and tabs and use good old mail() to send it to yourself.

    Sarah
     
    sarahk, Mar 10, 2005 IP
    nevetS likes this.