0

I have a problem for which I have not yet found any solution. I want to make a file a accessible via .htaccess/.htpasswd. So I created this file and put it into a subfolder at my we bapplication:

AuthType Basic
AuthName "Username"
AuthUserFile /var/www/.htpasswd
require valid-user

The access protection for the subfolder works, but not for the file in this.

I'm looking forward for any hint or help.

Thx!

Silvio
  • 1
  • BasicAuth is notorious for caching credentials. Make sure you are using a clean browser session...e.g. Incognito for Chrome, InPrivate for IE. Then re-test hitting the file directly. If its contained in an AUTH protected directory, you should be challenged to authenticate. Your settings look fine. – Brandon Harris Feb 11 '16 at 21:50
  • Also, to clarify, those auth settings should be in your .htaccess file and that .htaccess file should be in the same subfolder as the file you want to protect. – Brandon Harris Feb 11 '16 at 22:04
  • Hi Brandon Thx for your reply. Private session and access from 2 other webconnections unfortunately does not work well. I can readt the file without any protection. "" doesn't work too. The .htaccess is located in the same folder as the to be protected file. – Silvio Feb 12 '16 at 14:22
  • If you're using – Brandon Harris Feb 12 '16 at 16:58
  • It's strange. For .txt files, the protection works. For .php files not. – Silvio Feb 16 '16 at 00:47

0 Answers0