Visit the LQ Articles and Editorials section
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 02-09-2006, 07:40 PM   #1
Registered: Sep 2005
Posts: 114

Rep: Reputation: 15
Apache: how to redirect all pages "404 not found" to the homepage?

Let's say my website is 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?

Old 02-09-2006, 07:43 PM   #2
LQ Guru
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 269Reputation: 269Reputation: 269
Try following this:
Old 02-09-2006, 07:43 PM   #3
Senior Member
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 330Reputation: 330Reputation: 330Reputation: 330
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.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache Alias Returns 404 or "Cannot find server or DNS Error" The00Dustin Linux - Software 3 02-14-2006 01:44 PM
lftp: why the "404 NotFound" message? grautu Slackware 4 02-10-2006 08:22 PM
News: "Today the mydoom virus made the homepage of Linux unaccessible" J_Szucs General 31 02-09-2004 11:37 PM
Apache error_log "file not found" question WorldBuilder Linux - Networking 4 11-26-2003 01:53 PM
Cups & gimp-print "No pages found!" Silent1 Linux - Hardware 2 01-17-2003 11:44 AM

All times are GMT -5. The time now is 08:27 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration