What’s the opposite of required valid user in .htaccess authentication

I’m familiar with password protecting files and directories using apache authentication. I am working on a site where I have two WordPress installs on the same domain. One WP install is in the root /public_html/ another one is in a sub directory. We do NOT want to merge the user database this is why we are using separate WP installs.

The issue is I want to password protect wp-login.php file on the main install, but not on the sub directory install.

Read More

I went ahead and added the following code to my .htaccess file in my public_html directory.

AuthName "Admins Only"
AuthUserFile /path/to/passwd
AuthGroupFile /dev/null
AuthType basic

<Files wp-login.php>
require valid-user
</Files>

The issue is that this code blocks it for both the main WP site and the sub directory wp-login.php file.

I was hoping if there is a way that I can add in my /folder/.htaccess which will keep the other WP install open for login by anyone.

Let me know

Related posts

Leave a Reply

1 comment

  1. Ok guys, I did further research. Basically, all I had to do was add “Satisfy Any” argument. So the main .htaccess file looked like the one I posted in my initial thread. Then for the specific folder, I created a new .htaccess file (/folder/.htaccess).

    Then added this:

    <Files wp-login.php>
    Satisfy Any
    </Files>
    

    Much thanks to this thread on StackExchange