• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 200
  • Last Modified:

How to customise the 404 not found reponse frpm Apache

I have a web server running SME Server from Mitel (red hat based) with apache. I need to customise the response from apache when it can not find a specific web page on the server.

For example:

A person trys to view a page on our web site which has been deleted or moved. It will currently throw up "Error 404 not found" We need to auotmatically send them back to the index.htm page "of that domain" and not throw up an error page.

Where can we customise this in apache?

Is there a solution available?

Kind regards
Greg Anderson
0
gregnvt
Asked:
gregnvt
  • 2
1 Solution
 
wanna_beCommented:
create .htaccess file

put this line there (using url for your 404 page)

ErrorDocument 404 http://domain.com/whateverfile

there's a bug that IE won't display the page if it's over 500kb in size. or less than 500kb. i forget =).

hope this helps.


0
 
gregnvtAuthor Commented:
Hello

Thank you for the info. In creating the .htaccess file, where do we put this file?

Is the a directory these are loacted in?

Really appreciate your help :0)

Greg
0
 
cianid3Commented:
.htaccess file goes in the dir the files are located in.
I beleive you can also define this in the apache conf file.

0
 
wanna_beCommented:
...
0

Featured Post

[Webinar On Demand] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now