sync .htaccess with php session

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
dwighttttt
Forum Newbie
Posts: 2
Joined: Wed Nov 22, 2006 4:39 pm

sync .htaccess with php session

Post by dwighttttt »

is there any way to sync a php session with .htaccess? specifically, i would like users to log in through a php login screen and be able to avoid getting a login prompt for folders that are protected with .htaccess. i imagine a possible solution would be to set a server variable via php when a user logs in, have .htaccess check the same variable, and redirect accordingly.

i've done quite a bit of research but to no avail. can anyone tell me if this is even possible?

thanks

dshl
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Last I saw, no.

You could use PHP as an interface into the directory thereby removing the need for .htaccess protected functionality, at least in the HTTP authentication sense.
Post Reply