How can I prevent people (and search engines) from visiting these empty pages?

Discussion in 'Apache' started by DLGx, Jul 15, 2007.

  1. #1
    I'm having problems with empty database pages and I don't know how to handle it, and no one in my vicinity seems to know either.

    Consider this page for example:
    http://www.zoodu.com/disney-myspace-layouts/

    That section has got 12 pages, but if you manually insert a higher page number, like URL above + ?cat_id=5&num=1000 it will still return a page.

    Is this best solved with .htaccess or what? If so how? It would need conditionals for each affected section so that it knows at which page number to return say 404.
     
    DLGx, Jul 15, 2007 IP
  2. powerspike

    powerspike Peon

    Messages:
    312
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    0
    #2
    You htaccess file wouldn't know if you had 4 pages, or 13433 pages, this would be best done with coding, in your code, check the database, to see if the page exsists, if it doesn't, use the header command to return a 404 messages.
     
    powerspike, Jul 16, 2007 IP
  3. DLGx

    DLGx Active Member

    Messages:
    605
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    58
    #3
    That's not really possible, would require manual recoding of the entire website. The system it uses is old and has only started being a problem recently as google for some reason is indexing empty pages, no idea how the googlebot ends up on them in the first place.
     
    DLGx, Jul 16, 2007 IP