LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices



Reply
 
Search this Thread
Old 03-14-2007, 06:36 AM   #1
xpucto
Member
 
Registered: Sep 2005
Location: Vienna, Austria
Distribution: Mint 13
Posts: 522

Rep: Reputation: 31
apache: Object not found! How to redirect


Hi!
How can I redirect a user when he gives a wrong url? right now he becomes the message " Object not found!". Instead I would libke to have him redirect to the main page my website.
thanks for any help.
 
Old 03-15-2007, 04:11 PM   #2
Sagebrush Gardener
LQ Newbie
 
Registered: Mar 2007
Posts: 29

Rep: Reputation: 15
In /.htaccess ...

If you want to redirect a specific wrong URL to your main page:

Redirect /wrong_url.html http://www.mywebsite.com/

If you want to redirect ANY wrong URL to your main page:

ErrorDocument 404 http://www.mywebsite.com/

See http://httpd.apache.org/docs/1.3/mod/directives.html for details.
 
  


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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Object not Found error when accessing localhost. calculemus Linux - Networking 6 10-22-2006 11:52 PM
GNU R help with converting SPSS file - object not found towsonu2003 Linux - Software 2 03-04-2006 12:30 PM
Apache: how to redirect all pages "404 not found" to the homepage? newlinuxnewbie Linux - General 2 02-09-2006 07:43 PM
JSP context object not found poeta_boy Programming 1 09-21-2005 02:06 PM
cgi-bin (object not found, access forbidden) orish Linux - Newbie 3 05-24-2004 04:57 PM


All times are GMT -5. The time now is 05:57 AM.

Main Menu
Advertisement
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