Is there some simple code that I can add to an .htaccess
file or my virtual host file to enforce http basic auth?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
What about this ?
AuthUserFile /my/derectory/.htpasswd
Require valid-user
AuthName "Secured Access"
AuthType Basic
the interesting part for you is Require valid-user
But if you can, please provide more informations about why you have you tried to do ^^