I am running a Perl application named bitlfu.For login it is using something like Apache HTTP Basic Auth but not a form.I want to make form
This is a simple plug&play solution ;-). Will work for any domain (and on HTTPS too):
You can drop this in your 401 error document.
Note that return false is required so that the page is not reloaded twice.
return false