.htaccess All Page Redirect

Discussion in 'Site & Server Administration' started by mg3hockey, Jan 23, 2010.

  1. #1
    I have a very simple .htaccess question

    I want to direct all traffic that travels to a non existing page to be forwarded to the homepage.

    So if I make a spelling mistake in typing in the sub directory it will take me to the home page.

    How can I do this?
     
    mg3hockey, Jan 23, 2010 IP
  2. FavouritesBlog

    FavouritesBlog Peon

    Messages:
    846
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #2
    FavouritesBlog, Jan 23, 2010 IP
  3. ChrisMac

    ChrisMac Peon

    Messages:
    28
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Don't do it. If page doesn't exist you SHOULD send "404 Page not found" error. You will confuse search engine crawlers otherwise...
     
    ChrisMac, Jan 23, 2010 IP
  4. 1travel1

    1travel1 Peon

    Messages:
    27
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    1travel1, Jan 23, 2010 IP
  5. arunns

    arunns Peon

    Messages:
    7
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Why dont you use ErrorDocument 404 /error404.html or to custom error page.
     
    arunns, Jan 24, 2010 IP
  6. suertes8

    suertes8 Peon

    Messages:
    29
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Not recommended, very bad for SEO dude... you will have duplicate content issues.
     
    suertes8, Jan 24, 2010 IP
  7. ChopSuey

    ChopSuey Peon

    Messages:
    843
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Name it 404.shtml and have it in all directories.
     
    ChopSuey, Jan 25, 2010 IP