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.
Website hidden files?
-
MachineCode
- Addict

- Posts: 1482
- Joined: Tue Feb 22, 2011 1:16 pm
Website hidden files?
Microsoft Visual Basic only lasted 7 short years: 1991 to 1998.
PureBasic: Born in 1998 and still going strong to this very day!
PureBasic: Born in 1998 and still going strong to this very day!
Re: Website hidden files?
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.
If any of you native English speakers have any suggestions for the above text, please let me know (via PM). Thanks!
-
MachineCode
- Addict

- Posts: 1482
- Joined: Tue Feb 22, 2011 1:16 pm
Re: Website hidden files?
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. 
Microsoft Visual Basic only lasted 7 short years: 1991 to 1998.
PureBasic: Born in 1998 and still going strong to this very day!
PureBasic: Born in 1998 and still going strong to this very day!
Re: Website hidden files?
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.
If any of you native English speakers have any suggestions for the above text, please let me know (via PM). Thanks!
Re: Website hidden files?
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.
If the files are not publicly known and there is no sitemap, the files should never be found by anyone though.
▓▓▓▓▓▒▒▒▒▒░░░░░
- freepurebasic
- Enthusiast

- Posts: 123
- Joined: Fri Sep 24, 2010 12:02 pm
- Location: world wide web
Re: Website hidden files?
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
.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
Code: Select all
<?php die(); ?>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
-
MachineCode
- Addict

- Posts: 1482
- Joined: Tue Feb 22, 2011 1:16 pm
Re: Website hidden files?
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?
Microsoft Visual Basic only lasted 7 short years: 1991 to 1998.
PureBasic: Born in 1998 and still going strong to this very day!
PureBasic: Born in 1998 and still going strong to this very day!
Re: Website hidden files?
That depends on your servers operating system. IIRC In windows, the only limit is hard drive space. I don't know about Linux, though.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?
▓▓▓▓▓▒▒▒▒▒░░░░░