Pervent index view

jensen

Active Member
Messages
1,168
Reaction score
22
Points
38
Sometimes people cannot find the page they are looking for in your site and they remove the last words just before the "/" sign and then hit ENTER

They would get to see all the files in that folder.

How do we prevent that index of files from being seen?
 

Chris Z

Active Member
Messages
5,603
Reaction score
0
Points
36
what you could do is make sure you have a file named "index.php" "index.html" or you could just do a redirect to the main page..
 

jensen

Active Member
Messages
1,168
Reaction score
22
Points
38
Hi billy,

even with that index file one can still by pass that and get to your directory.
 

dharmil

New Member
Messages
1,656
Reaction score
0
Points
0
very simple
creat a .htaccess file and put this in there
Code:
IndexIgnore *
it will hide all your files
 
Last edited:

Spartan Erik

Retired
Messages
6,764
Reaction score
0
Points
0
jensen said:
Hi billy,

even with that index file one can still by pass that and get to your directory.

Really? I put an index.html file in the subdirectory I wanted to hide from the public, and it works fine.. I also put a 2 second HTML redirect on it too..
 

Chris Z

Active Member
Messages
5,603
Reaction score
0
Points
36
ya i'm not sure what he's talking about..maybe there's some sort of "function" that allows you to see it or something :dunno:
 

Bryon

I Fix Things
Messages
8,149
Reaction score
101
Points
48
In an .htaccess file write:

"Options -Indexes"

That will give all directories, (From "that one and lower"), a "Permission denied, you dont have access blah blah blah" HTTP error when someone attempts to view it's listing.

It's basically the same thing that Dharmil posted, but instead it gives the permission denied error.
 
Top