.htaccess protect folder without username

后端 未结 1 1992
情歌与酒
情歌与酒 2020-12-18 21:35

Is it possible to protect a folder with .htaccess by asking just a password?

I don\'t want a username.

1条回答
  •  时光说笑
    2020-12-18 21:55

    HTTP auth will always ask for a username and password, and not just a password. The server doesn't generate the form that pops up, your browser does. And that form will always have a username and password. You can't tell it to only ask for a password.

    But what you can do is generate an htpasswd file with a blank username so when the login window opens, people only need to enter a password and can leave the username field blank.

    0 讨论(0)
提交回复
热议问题