LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Apache: how to redirect all pages "404 not found" to the homepage? (https://www.linuxquestions.org/questions/linux-general-1/apache-how-to-redirect-all-pages-404-not-found-to-the-homepage-413607/)

newlinuxnewbie 02-09-2006 06:40 PM

Apache: how to redirect all pages "404 not found" to the homepage?
 
Let's say my website is www.domain.com how do I make it so whenever a 404 not found error page comes up to make it redirect to the homepage automatically? Do I do this in the httpd.conf file or .htaccess file of root server? What is the exact line I need to type?

Thanks.

pljvaldez 02-09-2006 06:43 PM

Try following this:

http://httpd.apache.org/docs/1.3/custom-error.html

macemoneta 02-09-2006 06:43 PM

In the httpd.conf file, you should see an entry like:

ErrorDocument 404 /missing.html

Update the document (missing.html) on the entry to point at any document you want.


All times are GMT -5. The time now is 11:12 PM.