php - .htaccess password protected folder goes to 404 page -


i've stumbled upon strange issue. lets have folder in main domain directory: /myfolder

when try access index of files in folder go to: myurl.com/myfolder , works without problems. when put .htaccess password protection in folder like:

authuserfile /home/mywebsite/.htpasssomerandomname authtype basic authname "authentication required" require valid-user 

suddenly instead of asking me password when try access myurl.com/myfolder 404 wordpress template page. below .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 might problem?

i don't understand why seems adding below line .htaccess inside protected folder fixed issue:

errordocument 401 "authorisation required" 

i've found fix online without explanation why works way. can add explanation? feels shouldn't that.


Comments

Popular posts from this blog

How to start daemon on android by adb -

Angularjs unit testing - ng-disabled not working when adding text to textarea -

testing - Detect whether test has failed within fixture -