We Push Buttons

Fixing Password Protection and WordPress Permalink Issues

Fixing Password Protection and WordPress Permalink Issues

You are here:

Only use this if you are an advanced user.

If you want complete protection of a folder in WordPress, you need to edit the htaccess file in your public_html folder and change the bold line below:

# BEGIN WordPress

RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

# END WordPress

to

RewriteRule ./ /index.php [L]

Once this rewrite rule is modified, the password protection of the internal folder should be working as expected. Make sure you clear the cache of your browser and check the modifications on your end.

Was this article helpful?
Dislike 0
Previous: Excluding Folders from WordPress Permalinks
Next: What is a Robots.txt file?
instagram default popup image round
Follow Me
502k 100k 3 month ago
Share