Re: Using PHP-based form authentication, circumventing existing Apache .htaccess "require valid-user"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Robert Cummings wrote:
On Sat, 2005-10-22 at 19:28, Dan Trainor wrote:

Hello, all -

I'm trying to think of how this might be possible, but I can't seem to come up with anything.

I'd like to make a login form of sorts, which would enable a user to authenticate against. A simple HTML form, with a PHP back-end, where a user enters a username and password. If this authentication succeeds, the user is redirected to the protected area. However, this protected area was originally protected by an Apache .htaccess-style "require valid-user".

After authentication succeeds, I'd like to redirect the user to the Apache protected directory, circumventing the .htaccess "require valid-user" method - because the user has already authenticated by some other means, and there's no need to re-authenticate against HTTP Basic Authentication.

Anyone know if this is possible, and if so, how this might work? I'm just looking for some ideas here.


If you know the appropriate login and password then you can redirect
using the username and password in the url (not very secure though):

    http://user:password@xxxxxxxxxxxxxxxxx/blahBlahBlah.php

Cheers,
Rob.

Thanks for the suggestion, Rob, but the dominant browser (sadly, IE) no longer supports this in later versions.

Thanks
-dant

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux