404 redirect with htaccess

Discussion in 'White Hat SEO' started by burnzie2413, Jan 17, 2011.

  1. burnzie2413

    burnzie2413 Newbie

    Joined:
    Nov 14, 2010
    Messages:
    38
    Likes Received:
    8
    Occupation:
    Computer Network Technician
    Location:
    Ohio
    Hey everyone. I'm trying to redirect my 404 errors to the root of my site. I have the following code in my .htaccess file:

    Code:
    ErrorDocument 404 /index.htm
    ErrorDocument 500 /index.htm
    
    My site is a basic, static html site. Normally with Wordpress I can just change the 404 page and it works easy but this is my first attempt with .htaccess.

    Anyone have any ideas on how I can use htaccess to redirect my 404 errors?

    Any help is appreciated.
     
  2. naveensingh

    naveensingh Power Member

    Joined:
    Feb 15, 2010
    Messages:
    696
    Likes Received:
    209
    Occupation:
    Wordpress & Magento Expert
    Location:
    United States
    hi,
    i think if you write the same for static site will work , will redirect 404 error to you 404page or what ever the page you want . have you tried that.

    ErrorDocument 404 /404page.html

    Male sure in htacess file wite in top of file

    RewriteEngine on

    will need on some server.

    hope will work

    thanks
    N!