WordPress.org

Ready to get started?Download WordPress

Forums

Pretty Permalinks and non-WP .htaccess (2 posts)

  1. Doodlebee
    Member
    Posted 5 years ago #

    I just wanted to share this because I spent 3 hours trying to find a solution for my issue. I only found one WordPress thread here in the forums on this, and the solution there did not work for me. Google threw up a few answers - but none of them worked either.

    Basically, I have WordPress installed in the root of a site. There's a single directory - outside of WordPress - that needed to be password-protected using .htaccess and .htpasswd. however, there's was a conflict: because of the "Pretty Permalinks" setup, the WordPress was redirecting all attempts to log into the protected area to the default WordPress 404 page.

    I tried all kinds of solutions to this - but the one that worked for me (for some weird, crazy unknown reason - I have no idea *why* this works): I saved a copy of the WordPress .htaccess file, then deleted it from my server. I logged into my hosting control panel and password protected the directory. Then I re-uploaded the .htaccess file.

    It worked. So bizarre - but there you go. Hopefully it helps someone else.

  2. palgrave
    Member
    Posted 4 years ago #

    That didn't work for me, but you can put

    ErrorDocument 401 default

    into the .htaccess file that is within the password protected directory. That should do the trick.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.