Page 1 of 1

Accessing The Site Folder protected by .htaccess

Posted: Thu Feb 24, 2005 8:03 am
by stonecold
Accessing The Site Folder protected by .htaccess

When I try to access a site folder which has been protected by .htaccess the browser will pop up a standard username/password dialog box.

Is there a way which allow to embed a username/password box in a website to do the authentication.

Thanks

Posted: Thu Feb 24, 2005 8:27 am
by feyd
remove the .htaccess file, place code in all scripts such that when a "new" user will be required to enter username and password. This is most often done with sessions and marking a user as logged in.

Posted: Thu Feb 24, 2005 11:38 am
by stonecold
But the files in the folder should be protected. Anyone can view those files without the .htaccess protection.

I want a way so that instead of browser login box, i can get the user verification done through my own login box.

Posted: Thu Feb 24, 2005 11:51 am
by feyd
I don't believe that's possible the way you have detailed.

You can place the actual folder outside the browsable space and use a script to pass the files to a client, or redirect all requests through a page (mod_rewrite) ...