[wp-hackers] Protecting WP directory :: The most strangest thing
Otto
otto at ottodestruct.com
Wed Oct 22 15:37:06 GMT 2008
Heh. htaccess password protection does not play well with WP's rewrite rules.
Workaround: Create a file on your website. Call it onerror.html. It
can be blank, doesn't matter what's in it. In your .htaccess file, add
this to the top of the file:
ErrorDocument 401 /path/to/onerror.html
ErrorDocument 403 /path/to/onerror.html
More info on why this works here:
http://wordpress.org/support/topic/89515?replies=7#post-454310
On Wed, Oct 22, 2008 at 9:56 AM, Mário Gamito <gamito at gmail.com> wrote:
> Hi,
>
> I'm trying to protect a WP directory, something I've done countless
> times before in Apache (but not with WP).
>
> Now, instead of appearing the dialog with the login and password
> boxes, I get a 404 !!!
>
>
> 92.250.120.1 - - [18/Oct/2008:01:10:32 +0100] "GET
> /files/breakthrough-richard-wright.mp3 HTTP/1.1" 404 14204
> "http://www.absinto.org/" "Mozilla/5.0 (Windows; U; Windows NT 6.0;
> en-US; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3 (.NET CLR 3.5.30729)
> Creative ZENcast v2.01.01"
>
>
>
> Here's my files:
>
>
> .htaccess:
>
> AuthType Basic
> AuthName imgs
> AuthUserFile /home/absinto/public_html/imgs/.htpasswd
> require valid-user
>
>
> .htpasswd:
>
> imgs:6TFsHlTQhms6Q
>
>
> Would you be so kind to try:
>
> http://www.absinto.org/imgs/
>
> or
>
> http://www.absinto.org/imgs/firefox.png
>
> The login and the password are both "imgs" (without the quotes).
>
> Could this be something WP related ?
>
> This boggles me!
>
> As a last note, I have no access to the Apache configuration file.
>
> Any help would be appreciated.
>
> Warm Regards,
> Mário Gamito
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>
More information about the wp-hackers
mailing list