WordPress.org

Support

Support » How-To and Troubleshooting » How to prevent listing of files within a directory

How to prevent listing of files within a directory

  • skcunningham

    @skcunningham

    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…..

Viewing 2 replies - 1 through 2 (of 2 total)
  • 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.

    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

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to prevent listing of files within a directory’ is closed to new replies.