realjsk Posted May 31, 2003 Posted May 31, 2003 How to prevent viewers from seeing the contents of some directories? For example, because the access mode of catalog/images is 777, a viewer can point his/her browser to "www.domainXxxX.com/catalog/images/" and (s)he will see all the contents of that directory. Is there a way to prevent this? And what other directories to which I should apply this fix? Thank you.
♥olby Posted June 1, 2003 Posted June 1, 2003 You could place an index.php in these directories, with the following contents: <?php header('location: http://<your domaine>/catalog/default.php'); ?> That would redirect visitors to your default.php page. HTH Best Regards olby
realjsk Posted June 2, 2003 Author Posted June 2, 2003 Will it solve the problem if I change the access mode of the directory to 711?
♥olby Posted June 2, 2003 Posted June 2, 2003 No - that directory has to writeable, but if the above isn't working out, you can just put an empty file named index.html into that directory. That'll prevent any browsing and give a blank screen. HTH Best Regards olby
Recommended Posts
Archived
This topic is now archived and is closed to further replies.