2017-07-29 35 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需絕對路徑