Forums

[resolved] hide directory structure (4 posts)

  1. leandrocc
    Member
    Posted 2 weeks ago #

    Hi everyone,

    I have my blog on http://www.mydomain.com and files I upload to use there go on directories like http://www.mydomain.com/wp-content/2009/11/filename.

    If a user notice that and copy this link, they have direct access to the file. But if he/she erases the /filename, then they'll get access to all files, including ones not used in any posts yet, and maybe never to be used.

    Question: Is there an easy way NOT to display this directory style page, and return to the main page (or any other one) ?

  2. MichaelH
    moderator
    Posted 2 weeks ago #

    Could copy the index.php from wp-contents folder into each of those sub-folders.

    Essentially that file is a php script that does nothing

    <?php
    // Silence is golden.
    ?>
  3. MichaelH
    moderator
    Posted 2 weeks ago #

    Or this .htaccess trick which I just tried in the uploads folder

    # Don't allow directory browsing
    Options All -Indexes
  4. leandrocc
    Member
    Posted 2 weeks ago #

    thanks a lot!

Reply

You must log in to post.

About this Topic

Tags