You are currently browsing the page No directory listing in the Miscellaneous category.

No directory listing

If you upload a folder without an index page (i.e. index.html or index.php etc.), and if you go to that folder URL, everything in this folder will be listed. Well, if you want to hide the contents of your folders without uploading index files each time, you should use this code. :) Open your existing htaccess file or a new doc and paste this:

IndexIgnore *

This will prevent the listing of ALL files, no matter what extension they have. If you want an exemple, try to access this folder. I uploaded images in this folder but the listing has been disabled :) Now, if you want to hide just your images, paste this

IndexIgnore *.gif *.jpg *.png

You can hide your HTML pages as well, by adding *.html etc.! Save the file, upload it and once it's on your server, rename it to .htaccess

Print This Post Print This Post



Sponsors


Leave a Comment

Works? Doesn't work? Other tips? Please leave a comment! :)

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>

To post codes, please go to SimpleCode and transform your codes first, so that it will displayed properly. Indeed, < and > need to be converted to &lt; and &gt; :)


Close
E-mail It