I've stumbled upon a strange issue. Lets say I have folder in main domain directory: /myfolder
When I try to access index of files in this folder I go to: myurl.com/myfolder And it works without any problems. Now when I put .htaccess with password protection in this folder like:
AuthUserFile /home/mywebsite/.htpasssomerandomname
AuthType Basic
AuthName "Authentication Required"
Require valid-user
Suddenly instead of asking me for password when I try to access myurl.com/myfolder I get 404 wordpress template page. Below is my .htaccess in main WordPress folder.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
Any ideas what might be a problem?
401
error, your htaccess will load the messageAuthorisation Required
. This message can also be replaced by a link to a (custom) page with more information about the error. – Nereen