Ok everybody, I think we're losing sight of the goal here. We want to be able to design our own log-in page (and of course it would be under SSL) that redirects the user to a page where they can download files that contain sensitive information. Correct me if I'm wrong, but bypassing the .htaccess file is never going to be possible with PHP because of ths simple fact that it is server-side programming. The authorization header is in the request that comes from the browser, and the only way you could control that is with a client-side programming language like an ActiveX control or mayba Java. So, aside from teaching yourself ActiveX, I did find a solution. It involves using PHP as a gateway to serve up files that are outside the web_root/ folders. If you're interested, I found the article on Zend.com:
http://www.zend.com/zend/trick/tricks-august-2001.php
So, it's too bad that this client is not satisfied with just putting their password in the browser pop-up and they want a single log-in page, because for a few clients the .htaccess method would be so much easier.
With all that said, I would like to respond to mtimdog:
It seems to me you're going about this a$$-backwards.
Who died and made you god?
Why not have the login-page redirect to a login on the https (so you take advantage of using ssl during login). That way, you don't have to worry about the hokey pokey.
We never said we wouldn't be using SSL from the start, and the "hokey pokey" you so elegantly speak of is so they don't have to log-in more than once.
If you need the login to be cross-domain (http, https)...you can store the login info in a database with the a random session id(not the one generated by php because that will probly change when you change domains), ip, etc...then either use a cookie or put the session id on the end of the link to link between http and https.
Thanks for the tip on using your own session ID, I'll remember that. We decided that sessions WILL NOT work though, because we're not protecting just PHP pages, and unless you know how to verify a session in an MP3 or Word DOC, having a session would be useless.
I don't care how many posts you have made, you should think before you type because you may or may not be a PHP pro, but saying things that are only intended to make others feel stupid only makes you look stupid.
Findapollo