Old URLS not returning 404 Page Not Found

Discussion in 'Site & Server Administration' started by mnymkr, Apr 12, 2009.

  1. #1
    I have some old URLs floating around out there

    When someone accesses my site from these, instead of getting a 404 , the site is redirecting to the homepage

    is there something i can add to my .htaccess to point these URLS to a 404 page
     
    mnymkr, Apr 12, 2009 IP
  2. hans

    hans Well-Known Member

    Messages:
    2,923
    Likes Received:
    126
    Best Answers:
    1
    Trophy Points:
    173
    #2
    hans, Apr 14, 2009 IP
  3. mnymkr

    mnymkr Well-Known Member

    Messages:
    2,328
    Likes Received:
    32
    Best Answers:
    0
    Trophy Points:
    120
    #3
    OK that was informative but the problem I am having is that the correct Error is not coming up for links that are not there so I can't even redirect them
     
    mnymkr, Apr 15, 2009 IP
  4. hans

    hans Well-Known Member

    Messages:
    2,923
    Likes Received:
    126
    Best Answers:
    1
    Trophy Points:
    173
    #4
    I am NOT sure to fully understand your last point

    the error messages from apache site are for pages that do NOT exist
    hence any misspelling or any request of old/deleted/never existed pages or pages requested in wrong path will result in such default error page redirects as explained in detail in apache docs

    hence whether a page EVER existed or not is of no importance for the proper working of such error messages

    teh best is you try
    take ANY of previous URLs that you want to redirect to a default 404 page
    and test it - make sure to CLEAR your browser cache each time you test !!!

    if your current situation redirects to your domain index - then may be an already existing error configuration does that

    whatever is in a SUB folder-htaccess overrides system wide or previous higher level htaccess

    hence check if any error directive is already existing in ANY sub-folder ...
     
    hans, Apr 15, 2009 IP