LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
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.

Notices

Reply
 
Search this Thread
Old 02-09-2006, 06:40 PM   #1
newlinuxnewbie
Member
 
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 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.
 
Old 02-09-2006, 06:43 PM   #2
pljvaldez
Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Squeeze (x86)
Posts: 6,092

Rep: Reputation: 269Reputation: 269Reputation: 269
Try following this:

http://httpd.apache.org/docs/1.3/custom-error.html
 
Old 02-09-2006, 06:43 PM   #3
macemoneta
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: 327Reputation: 327Reputation: 327Reputation: 327
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.
 
  


Reply


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 12:44 PM
lftp: why the "404 NotFound" message? grautu Slackware 4 02-10-2006 07:22 PM
News: "Today the mydoom virus made the homepage of Linux unaccessible" J_Szucs General 31 02-09-2004 10:37 PM
Apache error_log "file not found" question WorldBuilder Linux - Networking 4 11-26-2003 12:53 PM
Cups & gimp-print "No pages found!" Silent1 Linux - Hardware 2 01-17-2003 10:44 AM


All times are GMT -5. The time now is 04:42 AM.

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