Jump to content

Auth question


scrupul0us

Recommended Posts

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

Link to comment
Share on other sites

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!

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.