• Resolved leopardman

    (@leopardman)


    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

Viewing 1 replies (of 1 total)
  • Very late answer but shouldn’t you have

    Require valid-user
    #BEGIN WordPress

    instead of

    Require valid-user#
    BEGIN WordPress

    ?

Viewing 1 replies (of 1 total)
  • The topic ‘Error 500 when adding password protection’ is closed to new replies.