• Hi All,

    I have recently installed WP 2.3.1 on the subdirectory on my site and have followed the instructions
    Giving WordPress its Own Directory While Leaving Your Blog in the Root Directory. Now, I am able to view my blog on xyz.com, till this part its fine.

    The problem I am facing is that, now my index files of wordpress folder can be seen publicly at xyz.com/wordpress (wordpress is the name i have given to my wordpress directory)

    1)How can i hide this folder from public view?
    2) How can I make this page say, 404 not found ( for public)?

Viewing 8 replies - 1 through 8 (of 8 total)
  • Moderator Samuel Wood (Otto)

    (@otto42)

    www.remarpro.com Admin

    Create or edit the .htaccess file in the WordPress directory.

    Add this to it (on its own line):
    Options -Indexes

    That will disable index viewing for that directory and its subdirectories.

    Thread Starter ankurj

    (@ankurj)

    Thanks Otto42, quite a prompt reply.
    This line needs to be added inside <IfModule mod_rewrite.c> or outside it?

    I wonder why is it not mentioned anywhere? ( or probably am not able to access this info easily)

    My second question is how can I hide the xyz.com/wordpress/wp-admin login window from the public view?

    Moderator Samuel Wood (Otto)

    (@otto42)

    www.remarpro.com Admin

    This line needs to be added inside <IfModule mod_rewrite.c> or outside it?

    Outside it. Make the Options line the very first line in the file, in fact.

    I wonder why is it not mentioned anywhere? ( or probably am not able to access this info easily)

    This is a generic webserver thing, not a WordPress specific thing.
    https://httpd.apache.org/docs/2.0/mod/core.html#options

    My second question is how can I hide the xyz.com/wordpress/wp-admin login window from the public view?

    Err…. You don’t. You need that login window. To login with. ??

    Seriously, it’s not publicly visible unless somebody manually goes there. Just take the link off your site itself and bookmark the link.

    Thread Starter ankurj

    (@ankurj)

    Thanks Otto42!

    Thread Starter ankurj

    (@ankurj)

    Hi Otto42, For some reasons not known to me if I try to save Options -Indexes , it gets saves that time but in a days time it gets remove automatically from the .htaccess file.

    Can you help me with this?

    Who is hosting your site?

    Thread Starter ankurj

    (@ankurj)

    @ skeezicks: Dreamhost

    Sorry can’t help you there. I can’t find any instance of Options-Indexes in my files (local or online) so this must be a Dreamhost issue and I don’t use Dreamhost.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘How to hide index of wordpress directory?’ is closed to new replies.