Comments are available to members only. Sign up or Log in to view these comments.
Main Topics
Browse All TopicsI'm trying to add customized 404 (and other) error messages to my site. All of the help I found on the web, says create an .htaccess file, which I did, but i have also found info saying you need to have the AllowOveride set, is this done in the .htaccess file or in apache2.conf?
Here is what my .htaccess file contains:
ErrorDocument 404 /404err.php
Here is the section of the apache2.conf file that I think needs editing?:
# Customizable error responses come in three flavors:
# 1) plain text 2) local redirects 3) external redirects
#
# Some examples:
#ErrorDocument 500 "The server made a boo boo."
#ErrorDocument 404 /404.phpl
#ErrorDocument 404 "/cgi-bin/missing_handler.
#ErrorDocument 402 http://www.example.com/sub
#
#
# Putting this all together, we can internationalize error responses.
#
# We use Alias to redirect any /error/HTTP_<error>.html.v
# our collection of by-error message multi-language collections. We use
# includes to substitute the appropriate text.
#
# You can modify the messages' appearance without changing any of the
# default HTTP_<error>.html.var files by adding the line:
#
# Alias /error/include/ "/your/include/path/"
#
# which allows you to create your own set of files by starting with the
# /usr/share/apache2/error/i
# even on a per-VirtualHost basis. The default include files will display
# your Apache version number and your ServerAdmin email address regardless
# of the setting of ServerSignature.
#
# The internationalized error documents require mod_alias, mod_include
# and mod_negotiation. To activate them, uncomment the following 30 lines.
# Alias /error/ "/usr/share/apache2/error/
#
# <Directory "/usr/share/apache2/error"
# AllowOverride None
# Options IncludesNoExec
# AddOutputFilter Includes html
# AddHandler type-map var
# Order allow,deny
# Allow from all
# LanguagePriority en cs de es fr it nl sv pt-br ro
# ForceLanguagePriority Prefer Fallback
# </Directory>
#
# ErrorDocument 400 /error/HTTP_BAD_REQUEST.ht
# ErrorDocument 401 /error/HTTP_UNAUTHORIZED.h
# ErrorDocument 403 /error/HTTP_FORBIDDEN.html
# ErrorDocument 404 /404.php
# ErrorDocument 405 /error/HTTP_METHOD_NOT_ALL
# ErrorDocument 408 /error/HTTP_REQUEST_TIME_O
# ErrorDocument 410 /error/HTTP_GONE.html.var
# ErrorDocument 411 /error/HTTP_LENGTH_REQUIRE
# ErrorDocument 412 /error/HTTP_PRECONDITION_F
# ErrorDocument 413 /error/HTTP_REQUEST_ENTITY
# ErrorDocument 414 /error/HTTP_REQUEST_URI_TO
# ErrorDocument 415 /error/HTTP_UNSUPPORTED_ME
# ErrorDocument 500 /error/HTTP_INTERNAL_SERVE
# ErrorDocument 501 /error/HTTP_NOT_IMPLEMENTE
# ErrorDocument 502 /error/HTTP_BAD_GATEWAY.ht
# ErrorDocument 503 /error/HTTP_SERVICE_UNAVAI
# ErrorDocument 506 /error/HTTP_VARIANT_ALSO_V
So I guess the question is, what do i edit, my .htaccess or my .conf?
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Business Accounts
Answer for Membership
by: uetian1707Posted on 2008-04-30 at 10:32:58ID: 21472856
Comments are available to members only. Sign up or Log in to view these comments.