302error/redirect

Discussion in 'HTML & Website Design' started by Skinzeeteam, Sep 3, 2008.

  1. #1
    Hi there, have a doubt,
    Is there a way to design a page so that whenever people get a 302 error/redirect I could make them go to a google adsense page?
    How does it work?
     
    Skinzeeteam, Sep 3, 2008 IP
  2. mumed

    mumed Guest

    Messages:
    11
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    i believe you can do it with .htaccess
     
    mumed, Sep 3, 2008 IP
  3. Skinzeeteam

    Skinzeeteam Peon

    Messages:
    56
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    yes, but how? what is it that I have to do?
     
    Skinzeeteam, Sep 4, 2008 IP
  4. Dodger

    Dodger Peon

    Messages:
    1,494
    Likes Received:
    60
    Best Answers:
    0
    Trophy Points:
    0
    #4
    302 is not an error, it is a redirect only.

    Are you asking about a 404, page not found error? If so, then add this to your .htaccess file:

    ErrorDocument 404 /404.html
    Code (markup):
    Create a page with your adsense code on it and save it as 404.html in your root.

    Remember, this is a page not found error page. You should also have a message for your visitor that the page was not found and provide them with a few choices to navigate to, such as, a search page, sitemap, the home page, etc.
     
    Dodger, Sep 4, 2008 IP
  5. Skinzeeteam

    Skinzeeteam Peon

    Messages:
    56
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Thank you Dodger!
     
    Skinzeeteam, Sep 4, 2008 IP
  6. Dodger

    Dodger Peon

    Messages:
    1,494
    Likes Received:
    60
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Actually after thinking about this a bit, adding adsense to this type of page is not going to help you much. Gotta remember that adsense is based on the content of your page -- and a 404 is not ideal for this type of contextual markup.

    Are you having a ton of errors for pages not being found? If so, what did you do to start getting them?

    If you completely overhauled your site and moved things around, then you will need to use the redirect methods.
     
    Dodger, Sep 4, 2008 IP
  7. Kerosene

    Kerosene Alpha & Omega™ Staff

    Messages:
    11,366
    Likes Received:
    575
    Best Answers:
    4
    Trophy Points:
    385
    #7
    AdSense used to have a line in their TOS about not using it on error pages. You might want to read their latest TOS to see if it's still there before you do this.
     
    Kerosene, Sep 4, 2008 IP