Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 6 of 6
  1. #1
    Senior Member megablaz0r's Avatar
    Join Date
    Jul 2004
    Location
    Cheyenne, Wyoming
    Posts
    508
    Member #
    6548
    i'm needing to redirect users based upon their .htaccess authentication. ex: user craig would be redirected to website.com/private/craig

    any non-complicated way to do this with .htaccess, or any alternatives that will be just as secure?

  2.  

  3. #2
    Senior Member megablaz0r's Avatar
    Join Date
    Jul 2004
    Location
    Cheyenne, Wyoming
    Posts
    508
    Member #
    6548
    anybody?

  4. #3
    Senior Member
    Join Date
    Aug 2003
    Posts
    444
    Member #
    2801
    You can use PHP to work with .htaccess authentication, and you can easily do forwards with that. The best tutorial that I always go back to is at http://www.zend.com/zend/tut/authentication.php including code.

    Hope this helps.
    eKstreme
    eKstreme.com - Free website tools!
    fontfox - free fonts Hand-picked quality fonts.

  5. #4
    Senior Member megablaz0r's Avatar
    Join Date
    Jul 2004
    Location
    Cheyenne, Wyoming
    Posts
    508
    Member #
    6548
    Thanks, I'm still a little too newb for that though. :/

  6. #5
    Senior Member rosland's Avatar
    Join Date
    Jul 2003
    Location
    Norway
    Posts
    1,944
    Member #
    2096
    Newb or not, you have to learn these things!

    .htaccess was never meant to individually screen users. To do that, you need a basic database, and a script that checks user inputs against privileges stored in the database.
    (This is fairly easy.)

    The validation part and redirection, is pure code (we'll help you with that part).

    What you're homework should be, is how you would organize such a database. What sort of information do you think is needed in such a user database, and what criteria do you think would validate a screened login?

    What combination of criteria should redirect a certain user to a certain page?

    This is what you should clarify (to yourself, you don't have to give us all the details).

    When you have a workable structure, you can tell us what critical combination of factors (including (or not) things like username that would branch a redirect towards a predefined page.

    (how to protect those pages from unauthorized viewing, is also fairly simple (i.e. writing the page name would only redirect you to the login page)
    S. Rosland

  7. #6
    Senior Member
    Join Date
    Aug 2003
    Posts
    444
    Member #
    2801
    I wholeheartedly agree with Rosland. One thing that I have to always think about is: do I store the passwords in clear text or do I store them as md5 hashes? If they are md5'ed then you can't retrieve them and you have to reset them. If they are clear text, you have to REALLY trust your admins. But that's one aspect on top of everything Rosland said.
    eKstreme
    eKstreme.com - Free website tools!
    fontfox - free fonts Hand-picked quality fonts.


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 01:52 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2022 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com