Password-protected directories with wordpress

wordpress

#1

Greetings! I’m having some issues with an .htaccess password-protect subdirectory. I have an instance of Wordpress installed in the root of a website/domain that has a special (pretty) permalink structure; but I then created a subdirectory in the root (something like /download) that I want to password protect so only certain people have access. I’ve done what I needed to in the Dreamhost webpanel, but the permalink/wordpress install thinks that my subdirectory is actually a nonexistant page. What can I do to stop this discrepancy for this particular subdomain?

Thanks for any help!
Whitney


#2

You need to add a line to your .htaccess file to get Wordpress to ignore that directory.

Something like:
RewriteCond %{REQUEST_URI} !^/(download|download/.*)$

Where ‘download’ is the name of the folder you want WP to ignore.


#3

You may also need to put this at the top of your .htaccess, above the lines for #Begin WordPress

# To bypass download directory ErrorDocument 401 /401.html

Don’t worry about making the 401.html page, it should work without it.