WordPress.org

Ready to get started?Download WordPress

Forums

WP htaccess Control
[resolved] Error 500 when adding password protection (2 posts)

  1. leopardman
    Member
    Posted 3 years ago #

    I have added the normal

    AuthName "You are Entering a Test Area"
    AuthType Basic
    AuthUserFile /.htpasswd
    Require valid-user#

    to password protect directories.
    I'm asked for the username and password when trying to enter, which works well, to than end up in a 500 error.

    What's wrong with this .htaccess?

    AuthName "You are Entering a Test Area"
    AuthType Basic
    AuthUserFile /.htpasswd
    Require valid-user#
    BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /test/
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /test/index.php [L]
    </IfModule>
    # END WordPress

  2. Antonio
    Member
    Posted 2 years ago #

    Very late answer but shouldn't you have

    Require valid-user
    #BEGIN WordPress

    instead of

    Require valid-user#
    BEGIN WordPress

    ?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic