Home
/
WordPress
/
Configuration
/
Password protection and Wordpress permalinks issue. How to fix it?

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, 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. Clear the cache of your browser and check the modifications on your end.

Share This Article