Ready to get started?Download WordPress


Protect wp-content & wp-include using mod_rewrite? (2 posts)

  1. beernews
    Posted 6 years ago #

    I've seen this code mentioned in a few blog comments now posted by AskApache though I have not seen a source on how to actually implement it.

    I am still looking for a way to close off access to my content and includes parent directories while still allowing my plug-ins to work.

    What .htaccess file would this go in?
    And what other code is needed to go with what's below?

    RewriteCond %{QUERY_STRING} !error
    RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /(wp-includes|wp-content)/(.+)\.php\ HTTP/
    RewriteRule .* - [F]


  2. askapache
    Posted 6 years ago #

    You can get the program here, AskApache Password Protect

    Oh ya, and I added an additional security option to password-protect /wp-login.php

Topic Closed

This topic has been closed to new replies.

About this Topic