Page 1 of 1
Website hidden files?
Posted: Tue May 17, 2011 1:48 pm
by MachineCode
If I'm hosting a website, say at
www.example.com, and it has a subfolder named "files", can anyone find out which files are inside it somehow, if they DON'T know the filenames? So for example, if there are these files in there:
http://www.example.com/files/John.txt
http://www.example.com/files/Billy.txt
http://www.example.com/files/Karen.txt
Can anyone see this list of files? If so, how can I hide them, but make each one accessible to someone who knows the names? I don't want to use a password system, if possible.
Re: Website hidden files?
Posted: Tue May 17, 2011 2:05 pm
by c4s
Normally the files would be visible by visiting "
http://www.example.com/files/". So either put an empty index.php file in this folder or even better: If you can edit your .htaccess file add "
Options -Indexes" to it.
Re: Website hidden files?
Posted: Tue May 17, 2011 4:16 pm
by MachineCode
Thanks for the info. I did notice that I get a "403 - forbidden" error if I try to look into my directory, even though there's no "index.php" file in there, and no ".htaccess" file. Should I stick an empty "index.php" in anyway for good measure? Or what about "index.html"? I don't know anything about ".htaccess" so I don't want to mess with that.

Re: Website hidden files?
Posted: Tue May 17, 2011 4:44 pm
by c4s
The .htaccess file should be in the root directory of your account. I'm not an expert but I'd say that you're on the safe side when you get 403.
Re: Website hidden files?
Posted: Tue May 17, 2011 6:46 pm
by Nituvious
You should prevent access to the folder that contains the files using .htaccess
If the files are not publicly known and there is no sitemap, the files should never be found by anyone though.
Re: Website hidden files?
Posted: Tue May 17, 2011 7:05 pm
by freepurebasic
lol guys!
.htacess is working only on apache, so if you want to deny the access to that files use .htaccess,
if you want only to hide listing use this
index.php
(for old servers use )
index.php3
default.php
default.php3
(this are combinations you must use in case you haven't administrative rights,the server isn't your so you have no access to apache file configuration, or php.ini)
if is only a html hosting use
index.html
or
default.html
Re: Website hidden files?
Posted: Tue May 17, 2011 11:03 pm
by MachineCode
Thanks for the help so far. One last question: is there a limit to the number of files that can go inside a website directory like that? It's an Apache host. I intend to use files that may app downloads from there, and was wondering if it could support like 10,000 files or more. Or should I break them down into different subdirectories?
Re: Website hidden files?
Posted: Wed May 18, 2011 1:32 am
by Nituvious
MachineCode wrote:Thanks for the help so far. One last question: is there a limit to the number of files that can go inside a website directory like that? It's an Apache host. I intend to use files that may app downloads from there, and was wondering if it could support like 10,000 files or more. Or should I break them down into different subdirectories?
That depends on your servers operating system. IIRC In windows, the only limit is hard drive space. I don't know about Linux, though.