Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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
    
You should be able to get from your hosting provider which settings you are able to override in an .htaccess file. –  emgee Mar 26 '11 at 22:43
add comment

migrated from superuser.com Mar 27 '11 at 1:28

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

1 Answer

up vote 1 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
add comment

Your Answer

 
discard

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.