Password protection and WordPress permalinks issue. How to fix it?

When you want to password protect a subfolder of your account, if there is a WordPress application installed in the public_html folder, the rewrite rules of the WordPress application will most likely negate the password protection.

To have the folder properly protected, you need to edit the .htaccess file in your public_html folder and change the bold line below:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress

to

RewriteRule ./ /index.php [L]

Once you modify this rewrite rule, the password protection of the inner folder should be working as expected. You should clear the cache of your browser and check the modifications on your end.

You find this article useful? Click here to learn more about SiteGround web hosting experts and what else we can do for you!