The forums have permanently moved to This forum will be kept around in read-only mode for archival purposes. To learn how to continue using your existing account on the new forums, check out this thread.

Results 1 to 8 of 8

Thread: .httaccess

  1. #1
    Registered User


    guys, i need to protect a page called "admin.php"

    wat can i add to my .httaccess which is in the same directory to protect it?

  2. #2
    Registered User
    just use sessions to password protect it....I wouldnt bother with changing .htaccess

    a simple script
    if(isset($_POST['username'] && isset($_POST['password'])){
    if($_POST['username'] == 'admin' && $_POST['password'] =='admin'){
    $_SESSION['logged_in'] = 'yes'

  3. #3
    It's actually easier to use htaccess than PHP, though I'd recommend using edit:/[the] latter.
    Last edited by hl; January 26th, 2008 at 12:08 AM.
    got pwnt?

  4. #4
    Registered User
    yeh im just trying to create good coding practices

  5. #5
    the best coding practice is the fastest and most secure one.

    (and truth be told I still have a hard time conceiving the hold session thing )

  6. #6
    If you are gunna use htaccess the filename is ".htaccess" exactly.
    I noticed you spelt it with two t's.
    Web Design and Web Development blog
    Designer Notice: Browser List for design compatibility

  7. #7
    Registered User
    Quote Originally Posted by alexgeek View Post
    If you are gunna use htaccess the filename is ".htaccess" exactly.
    I noticed you spelt it with two t's.
    sry.... i meant to say t, im still not getting a definite answer... wat exctly do i do with the htaccess file? i dont want to mess around with the php file...

  8. #8

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Home About Meet the Moderators Advertise

 Link to Us


Copyright 1999 - 2012