user297850
user297850

Reputation: 8015

password protected file associated with a hyperlink

I am trying to create a homepage, which includes hyperlink.

For example, after clicking sth called file1.txt, I should be directed to text file. However, before the file is to be displayed, a box should be popped up asking username and password. Can you tell me how to do it? Thanks.

Upvotes: 1

Views: 140

Answers (1)

Quentin
Quentin

Reputation: 943625

With plain HTML? You can't.

The simplest way is to use HTTP Basic Auth. The specifics of which depends on the web server software you use. e.g. for Apache: http://httpd.apache.org/docs/2.2/howto/auth.html

Upvotes: 2

Related Questions