stickynote427 Posted July 23, 2009 Share Posted July 23, 2009 I'm trying to set up custom error pages on my Web site. I got the 404 page set up successfully, but once I try to make the 403 page, neither of the error pages work. The following is the content of .htaccess in my public_html directory: ErrorDocument 403 /pages/error_pages/403.php ErrorDocument 404 /pages/error_pages/404.php I can go to a nonexistent page and have the 404 page appear correctly. Now, I don't want the /pages directory (which includes all directories and files in that directory) to be listed when someone visits there (www.example.com/pages), which is what happens right now. So, I create an .htaccess file in the /pages directory and enter the following: deny from all Now when I try to visit a nonexistent or disallowed page (anything in the /pages directory) I get the default error pages (not my custom ones). I don't understand why this is happening. It seems to me that my server(?) or PHP is also being disallowed access to any files in the /pages directory. Shouldn't my site/server/whatever still be able to access anything on the server, and just someone browsing around my site can't? If you need more info, please ask. Thanks, stickynote427 Quote Link to comment Share on other sites More sharing options...
stickynote427 Posted July 23, 2009 Author Share Posted July 23, 2009 Never mind. I was using the wrong directive. I needed Options -Indexes instead. Sorry. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.