Jump to content

.htaccess for custom error codes

Recommended Posts

Have the following in .htaccess

ErrorDocument 401 /401.phpErrorDocument 403 /401.phpErrorDocument 404 /404.phpErrorDocument 500 /500.php

and works fine for web root requests. However, does not work if wrong file accessed within a directory. Have tried to have full system paths and is the same situation. Do I need to have .htaccess for each folder then? Or how can I improve this? Thanks,Son

  • Like 7
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...