scrupul0us Posted April 27, 2007 Share Posted April 27, 2007 IS there a way to setup a directory with auth such that i dont give it a username/password of anytype BUT i can pass headers to apache via PHP to authenticate basically what im trying todo is authenticate users on my front end using MySQL and then send them to a protected directory underneath that main root if you will... right now the main root doest allow indexes BUT if you know the directory name under that root you can load its contents just fine (i am using satisfy all) so in short: -even if you know the correct directory and proceed to it youll get bounced back to the "root" -if you are authenticated via php & mysql send a header to apache that says this user is good allow them in Quote Link to comment Share on other sites More sharing options...
the_oliver Posted April 29, 2007 Share Posted April 29, 2007 Not sure if you can do this. Its kind of a controdiction in terms! Might be easyer to do this via php. You could wight a function to sit at the very top of whatevers in the file. The script would do somethig like: Query database to see if that session_id() is linked to an authenticated user. If the above returns false then redirect to the public area. If above returns true then load the rest of the page. So long as this is at the top, then they will be redirected before any other content is loaded. Enjoy! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.