After witnessing a number of designs ripped from - what I thought to be hidden - directories on my server, I've finally found the motivation to password protect a client sandbox. I've gone through and used my hosts password protection option to create a username and password for a directory on my server. Does anyone have tips on creating an actual XHTML / CSS login splash page?
Ex: I have a subdomain setup with a directory within. I would like the splash page on the subdomain to redirect after login to the directory.
I've always had a fear of developing login interfaces, I suppose because of the responcibility you have for security. However, I had to develop one recently and actually found it alot simpler than I had ever expected it to be. I found this http://www.devarticles.com/c/a/PHP/PHP-for-Beginners-by-a-Beginners/ tutorial really helpful, although once I'd read the first couple of pages I found I didn't actually need it.
create a table with your clients user names (same names as the directory) & passwords, when they login (authenticate against table), you can use scandir (php5) or fopen to serve directory contents (can be design integrated and "appears" local).. should set a cookie/session to keep them logged in too. sensitive material shouldn't be in your webroot (ever). using an absolute path you can serve files from anywhere on your server outside of the web root, given the folders/files are readable (unix) by whatever user runs your server process (www..etc).
lol, never really thought about that actually . . when you ask me login interface, the only thing I probably going to do is start a session and check the input with database :p
another option (if available), albeit slower and slightly more involved is to use php's ftp functions.. among the benfits being the ability to connect securely and transparently (see: ftp_sssl_connect() .. all depends how sensitive the information is and how vigilant your enemies are :)