WordPress.org

Ready to get started?Download WordPress

Forums

How to prevent listing of files within a directory (3 posts)

  1. skcunningham
    Member
    Posted 7 years ago #

    How can I prevent someone from going to a directory within my WordPress site and seeing a listing of all of the files?

    Thanks,

    Scott.....

  2. MichaelH
    Member
    Posted 7 years ago #

    There may be another way, but the wp-content folder has an index.php file that you could copy into other folers. It essentially displays nothing.

  3. phuckd
    Member
    Posted 7 years ago #

    you could also create an .htaccess file you can put in the root, or in each directory, depending on how you want too, that will re-rirect users
    something like

    IndexIgnore *

    <Files .htaccess>
    order allow,deny
    deny from all
    </Files>

    more info here http://www.javascriptkit.com/howto/htaccess.shtml

Topic Closed

This topic has been closed to new replies.

About this Topic