security - disabling view of folder files from website -


if person goes site , type url www.mysite.com/admin/includes, webpage displays entire directory! how can stop this? of files in php though, if downloads files, they're blank, hacked website , i'm wondering if knowing directory structure helped them.

i need disable viewing of directory structures, while allowing display of images www.mysite.com/images/image1.jpg

in .htaccess file, insert following line:

options -indexes 

this prevent viewing of directory indexes, whilst allowing actual files pass through.

note must have allowoverride options set in config (this done in hosting environments).


Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -