PDA

View Full Version : need help with keeping safe my files...



auriaks
08-07-2009, 08:35 PM
I created many directories in my database like: Pictures, data and etc...
But how i can keep those files hidden? because everyone can open those folders with pictures.{egzample: www.xxx.lt/pictures/mouse.jpg} Everyone can see what is in that directory. i want, that if someone enters that, thay will get negative answer, not my picture. :)
im looking forward to this.. thanks

JShor
08-07-2009, 11:01 PM
For Pictures, you can set your server to have hotlinking disabled. As for the folder directories,you can create an index.[extension] file that says "Access Denied" or something to that effect.

Additionally, you can password-protect directories thru your hosting system [you can ask your hosting provider on howto do it. In cPanel at least, it's very simple.]

But this question shouldn't have been posted under "PHP", php scripting doesn't have the ability to manipulate your server such as create password-protect directories, etc.

Good luck!

auriaks
08-07-2009, 11:08 PM
thanks and sorry... i cant find where to write like that :D

JShor
08-08-2009, 03:41 PM
No problem. Btw, for directories, usually I have an index.php file which redirects [via header();] to the home page.

Like this:


<?php

header("Location ../index.php");

?>