Page 1 of 1

Getting past htaccess request on non php sub-site

Posted: Mon Jul 21, 2003 9:16 am
by leenoble_uk
I may have a totally wrong approach here so I'm open to suggestions. Here goes.

I'm running a webserver for development only purposes. I'd like to grant access to clients in order to view progress. Ideally I don't want each client seeing the names of any other client. Now not every site I develop uses PHP, most are just plain HTML websites so I don't want to go sticking an extra PHP page in every single folder as it'll mean taking it out again at the end and messing with the file structure. I would like each site folder undisturbed. The only exception to this is the necessary .htaccess file in order to prevent unauthorised access.
So I have my root web folder which for example contains twenty sub-folders with a different client's website in each. Each of those folders has a .htaccess file with a unique username/password combo given to the client.

I want a login box, a nice one though actually on the page, not an apache authorisation request. They look a bit flaky. I want the login page at the root level to be filled in, the username and password would be cross referenced to a file or database in order to find out the name of the folder containing the clients' website. And then they'll be taken straight there. But wait. If I do that the .htaccess file will request the username and password again. So is there any way of passing the username and password entered on the previous page straight to the http authentication request of the subfolder to prevent it even appearing.

Is this plausible? and if so how? The http authentication docs all seem to relate to the folder you are currently in, but I don't want to go messing with the site structure which this will require.

Thanks in advance for any help offered.
Lee