Gaming World Forums

General Category => Technology and Programming => Topic started by: cowardknower on June 17, 2008, 01:15:58 am

Title: ok on my site i want to make it so nobody can get into a directory
Post by: cowardknower on June 17, 2008, 01:15:58 am
How do i do it?  HELP ME
Title: ok on my site i want to make it so nobody can get into a directory
Post by: GZ on June 17, 2008, 02:12:00 am
most sites do this by default if you do not have an index.html / index.htm / index.php file. your host however may be blocking this by showing a generic error page. basically if this is the case, you would need a PHP script to do this. what is your host?
Title: ok on my site i want to make it so nobody can get into a directory
Post by: Bobberticus on June 17, 2008, 02:59:47 am
http://www.elated.com/articles/password-protecting-your-pages-with-htaccess/
Title: ok on my site i want to make it so nobody can get into a directory
Post by: Lord Kamina on June 17, 2008, 03:49:50 am
You don't really need to set a password even, you can just add a "deny from all" or something like that in the htaccess, look it up because I don't recall the actual syntax.
Title: ok on my site i want to make it so nobody can get into a directory
Post by: pburn on June 17, 2008, 04:12:06 am
Couldn't you just connect to your webhost on FTP, right click the folder, and edit the folder permissions?
Title: ok on my site i want to make it so nobody can get into a directory
Post by: dada on June 17, 2008, 06:27:45 am
So many people eager to help despite not really knowing how...

If your server runs Apache, you can make a file called .htaccess (yes, including the dot) and stuff it with the following:
Options -Indexes
And that's it. You yourself won't be able to see the index either.

If that somehow doesn't work, just make an empty index.html file, that's just as effective (although it takes more effort).
Title: ok on my site i want to make it so nobody can get into a directory
Post by: dom on June 17, 2008, 12:06:48 pm
the question is why you want something in a public directory that noone can get access to???
Title: ok on my site i want to make it so nobody can get into a directory
Post by: cowardknower on June 17, 2008, 07:30:16 pm
the host is bluehost.  And actually yeah itd be better if I could password it that would be sweet.
Title: ok on my site i want to make it so nobody can get into a directory
Post by: GZ on June 18, 2008, 03:12:31 am
the host is bluehost.  And actually yeah itd be better if I could password it that would be sweet.
instead of doing all this complicated stuff why don't you just make an obscure directory? as long as you only tell the people who matter it exists you really wouldn't need this stuff. for instance i have secret junk i only share with a few people, and i just put it on a random host of mine and only tell them the file location. basically, the key is the folder name in this instance.

i am pretty sure you can do wacky htaccess stuff to do this, but it seems a bit impractical. if you were some big company or something, i could understand this, but who's going to go snooping in CONCHFELDS WEBSITE and look for secret files (hack conchfeld???)? some guy here will probably answer this the proper way but it just seems like a lot of hoops to jump through when there are easier ways.
Title: ok on my site i want to make it so nobody can get into a directory
Post by: cowardknower on June 18, 2008, 03:35:24 am
well no see when i google emFrik my mp3 directory comes up and i do not want that to happen.  and i do not want every tom dick and harry to be able to go in there and DL stuff it is just not good!
Title: ok on my site i want to make it so nobody can get into a directory
Post by: goat on June 21, 2008, 07:42:09 pm
What is your purpose for even having the mp3 folder there in the first place?
Title: ok on my site i want to make it so nobody can get into a directory
Post by: dom on June 22, 2008, 12:23:24 pm
http://www.htaccesstools.com/htaccess-authentication/

use this and the htpasswd entry generator to make a password protected directory
Title: ok on my site i want to make it so nobody can get into a directory
Post by: dada on June 22, 2008, 04:28:34 pm
well no see when i google emFrik my mp3 directory comes up and i do not want that to happen.  and i do not want every tom dick and harry to be able to go in there and DL stuff it is just not good!
You can still do what GZ suggests. Make your root folder inaccessible to everybody, then give the MP3 folder an obscure name that nobody will be able to guess. It'll vanish from Google that way too.