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.

Ads not Parsing on my 404 error page

Discussion in 'Co-op Advertising Network' started by yonnermark, Sep 19, 2005.

  1. #1
    Hi,
    First of all, the co-op is great and this forum is great and I thank anyone who replies in advance, you are all very generous people.

    PROBLEM:
    Whenever I try to validate my site, the co-op system says that ads were not found on certain pages. The pages in question no longer exist. They are old .htm pages that were deleted at least 2 months ago. About 1 week ago I used my robots.txt file to tell google to "non-cache" any .htm pages (the new site is purely .php files).

    So in order to stop the co-op from returning these pages, I added a 404 error page that contained the ad_network code. But the 404 will not parse my ads.

    You can see my 404 page in action here:
    www.markgoodwinpianos.co.uk/nopagehere

    I'm as sure as I can be that I have put all the ad codes in all the right places and that my .htaccess file is correct so does anyone have any idea how I can get around this problem? Why have the pages not been removed from google's cache by now?

    THANKS
    Mark
     
    yonnermark, Sep 19, 2005 IP
  2. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,333
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #2
    Your 404 page is not parsing PHP (check the source and you can see the PHP code).
     
    digitalpoint, Sep 19, 2005 IP
  3. yonnermark

    yonnermark Peon

    Messages:
    137
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Here is the entire html code for my 404 page:

    I will now try and enter a full url instead of a site relative path. That could be the trick because the ads are parsing on all the other pages of the same website perfectly fine. Unless you have another idea of can spot a problem in the above code?
     
    yonnermark, Sep 19, 2005 IP
  4. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,333
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #4
    It's nothing to do with the path. The problem is the page itself is not being parsed (at all) as PHP. You can see the PHP in the source. Simple PHP code of
    <?php echo 'Hello world'; ?>
    PHP:
    would not work either.
     
    digitalpoint, Sep 19, 2005 IP
  5. yonnermark

    yonnermark Peon

    Messages:
    137
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Ah yes, the PHP is not being parsed at all, you are correct.
    So what could be causing this do you think?
    The ads can be seen working properly on all the other pages of my site at www.markgoodwinpianos.co.uk

    Here is my .htaccess content.
    Does that offer any further clues?
    thanks
    mark
     
    yonnermark, Sep 19, 2005 IP
  6. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,333
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #6
    I really don't know to be honest... I'm not sure how the 404 documents are handled. Maybe it's as simple as changing the filename from nopagehere to nopagehere.php?
     
    digitalpoint, Sep 19, 2005 IP
  7. blinxdk

    blinxdk Peon

    Messages:
    660
    Likes Received:
    27
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Your 404 page is type text/html - make it a php page and point your ErrorDocument to it.

    Like this in your virtualhost setting:

    ErrorDocument 404 /mycustomerrorpage.php (assuming you use apache)
     
    blinxdk, Sep 19, 2005 IP
  8. yonnermark

    yonnermark Peon

    Messages:
    137
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #8
    That sounds promising, thanks blinx.
    However, I think I need walking through this.

    How do I make it a php page? Change the extension? Change the doctype?

    Hmmm, can I do this through CPANEL?
    I'm not at all sure how to do that step. Can you help further?

    THANKS AGAIN
    Mark
     
    yonnermark, Sep 19, 2005 IP
  9. fryman

    fryman Kiss my rep

    Messages:
    9,604
    Likes Received:
    777
    Best Answers:
    0
    Trophy Points:
    370
    #9
    Error pages are shtml, just add that extension to your parsing and problem solved.
     
    fryman, Sep 19, 2005 IP
  10. blinxdk

    blinxdk Peon

    Messages:
    660
    Likes Received:
    27
    Best Answers:
    0
    Trophy Points:
    0
    #10
    I don't know anything about CPANEL, follow fryman's advise :)
     
    blinxdk, Sep 19, 2005 IP
  11. yonnermark

    yonnermark Peon

    Messages:
    137
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #11
    Well I just tried to add the .shtml extension to my .htaccess file and then tried to view a non-existent page and I got a message from my firefox browsing saying I was trying to open an application and I should choose a program to open it with. So this isn't fixed just yet.

    So when you say
    What exactly do you mean? Did I do what you were suggesting?

    thanks folks
    Mark
     
    yonnermark, Sep 19, 2005 IP
  12. fryman

    fryman Kiss my rep

    Messages:
    9,604
    Likes Received:
    777
    Best Answers:
    0
    Trophy Points:
    370
    #12
    Yes, but I have no idea why that is happening to you, it must be some problem with your server configuration, I have ads on a few of my 404 pages and they show up fine
     
    fryman, Sep 19, 2005 IP
  13. yonnermark

    yonnermark Peon

    Messages:
    137
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #13
    and why do you include the .shtml extension in your htaccess file?
    Is your site php based?

    I have my site hosted with flump I think. They are a large company right? they should have standard configuration for this kind of thing
     
    yonnermark, Sep 19, 2005 IP
  14. fryman

    fryman Kiss my rep

    Messages:
    9,604
    Likes Received:
    777
    Best Answers:
    0
    Trophy Points:
    370
    #14
    I include it so it can understand the coop code
     
    fryman, Sep 19, 2005 IP
  15. yonnermark

    yonnermark Peon

    Messages:
    137
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #15
    do you have a php site?
    the ad_network setup file says that the htaccess file isn't even required for a php site.
     
    yonnermark, Sep 19, 2005 IP
  16. yonnermark

    yonnermark Peon

    Messages:
    137
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #16
    How do you think I could test this?
    I guess I'll send a message to my host asking why php isn't being parsed on my 404 page. That's probably a good place to start :)
     
    yonnermark, Sep 20, 2005 IP