Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there a way to make apache redirect error codes (401 particularly) to a custom page?

I tried using "ErrorDocument 401 /errors/somepage.html" in the htaccess file but its not working.
Any other ways of doing that?

Oh - I don't have access to httpd.conf :>

share|improve this question

migrated from Mar 27 '11 at 1:28

This question came from our site for computer enthusiasts and power users.

You should be able to get from your hosting provider which settings you are able to override in an .htaccess file. – user17642 Mar 26 '11 at 22:43
up vote 0 down vote accepted

If you have been granted the appropriate override in the httpd.conf you will be able to do it in .htaccess. If you don't have that override permission you won't be able to do it without access to the httpd.conf.

AllowOverride FileInfo

in the section of the httpd.conf for your site will grant you the permission to set error pages in .htaccess. If there is already an AllowOverride entry then add FileInfo to the existing one.

Contact the person who has control over the httpd.conf file and ask if they will add that permission.

share|improve this answer
Thanks. Now I need to go after the sysop... :> – Halik Mar 27 '11 at 10:39

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.