2017-07-29 61 views

回答

1

是的。您必须使用一些像这样在你的.htacess文件:

AuthType Basic 
AuthName "Password Protected Area" 
AuthUserFile /path/to/.htpasswd 
Require valid-user 

你可以使用这个在线生成器来创建你的htpasswd文件: http://www.htaccesstools.com/htpasswd-generator/

小心:/path/to/.htpasswd需绝对路径