using htaccess to restrict wp-content access from the browser

  • Author
    Posts
  • #201573

    cristiansans
    Member

    hi,

    i’ve just been playin g the whole day with the .htaccess file to get the most accurate configuration. my goal is to block the access to the wp-content folder from the browser.

    i’m not so familiar with rewrite rules and i’m not so happy with the result, i think that i can be done in a cleanest way,

    Actually i added a blank index.php files to any folder inside wp-content and write a rule for any of the folders that looks like this:

    Redirect 301 /wp-content/index.php http://mydomain.com/

    I think that this can be done in a better way because this solution doesn’t cover the full access to the folders. And when I tried to aply te rule directly to the folder, as you can imagine, some of the plugins that i’m using or even the upload module stop to run because the server is redirecting any request to this folder.

    I was just wondering if someone can point my in the right way.

    Thanx!

    #201691

    cjwriter
    Member

    I think you’re in the wrong forum. This is for WordPress.com blogs; you sound like you’re self-hosted using WordPress.org software. Our blogs work differently; if you ask over at http://wordpress.org/support/ they should be able to help you.
    http://faq.wordpress.com/2006/05/07/wordpresscom-vs-wordpressorg/

    #201693

    cristiansans
    Member

    ups sorry i just thought that i was on support… i’m gonna check there.

    If someone can delete the comment it would nice.

The topic ‘using htaccess to restrict wp-content access from the browser’ is closed to new replies.