Question : Forbid users from opening a folder on a website

Hi,

I would like to forbid users from being able to log onto a particular folder. For instance:

www.example.com/folderA

where folderA contains main.html and image.gif

I would like the users to be able to visit the page itself but not able to browse in the folder itself.

Thanks.

Answer : Forbid users from opening a folder on a website

I don't think you can, htaccess can be use to display a custom page when there is a server error (like page not found 404) but since browsing a directory does not trigger an error I don't think it is possible.

Unless you got thousand of directories it doesn't take very long to upload an index.htm file (which is always the same generic one) in each folder.
Random Solutions  
 
programming4us programming4us