• Resolved Neil

    (@ademmeda)


    Hi,

    I normally use .htaccess to prevent directory listings using the following:

    Options -Indexes

    Can you please explain how WordPress handles this without the use of a .htaccess file?

    For example, when you try to go to http://www.mysite.com/wp-admin/css/ it gives a 403 error.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    Options -Indexes

    Can you please explain how WordPress handles this without the use of a .htaccess file?

    WordPress doesn’t: that’s a configuration on the web server. That option also works if you put it into the web server’s httpd.conf or equivalent which is where most of us have that configured.

    Directory listings are not good. 😉

    Thread Starter Neil

    (@ademmeda)

    Thanks. I always thought WordPress had an internal mechanism to prevent directory listings, now after your reply and checking some more WordPress sites, I see that it doesn’t.

    Well, I’m not sure if this counts, sometimes there are blank index.php files in directories like the wp-content/themes/ directory.

    <?php
    // Silence is golden.
    ?>
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How does WordPress prevent directory listing?’ is closed to new replies.