How to Add Error Page Redirect to .Htaccess
- 1). Open Microsoft Windows Notepad by clicking the Windows "Start" menu, "All Programs," "Accessories" and the "Notepad" icon.
- 2). Create the error page redirect in the ".htaccess" file by typing the following line in Windows Notepad, excluding the quotation marks and period: "ErrorDocument 404 /index.html." Save the file to your Windows Desktop with ".htaccess" (without the quotation marks) as the name. Make sure that you have an "index.html" file uploaded to the FTP server. If, for example, the default file is "index.php," "index.asp," "index.aspx" or "index.htm," replace "index.html" in Windows Notepad to reflect this.
- 3). Upload the newly created ".htaccess" file to your FTP server via your FTP software. The file needs to be uploaded to the root directory of your Web hosting account. After you've uploaded the file to the root directory, if users type an incorrect link in the Web browser address bar, they will be redirected to the page that you've specified in the ".htaccess" file.
Source...