Pages

Wednesday, July 31, 2013

set up a 403 - forbidden access

You can choose whether to show the index of files or not in your cPanel using the Index Manager. If you set the public_html folder to not show indices then that would be the default for all folders.

Its very easy to setup custom error documents, and forbid access to directories and indexes.
403 "Forbidden" is acomplished by first creating the custom error page, then adding a link to it in a .htaccess file in the public_html, and adding "Options All -Indexes" directive to the .htaccess

like so:

Step 1:
create your custom error page

step 2:
create file, name it .htaccess

Step 3:
edit file and add the following:

.htaccess

Quote:
## Error Page
ErrorDocument 403 /page/22.html

Thats it! Your done.

No comments:

Post a Comment