password protect databases using .htaccess

by 5 replies
6
does anyone know some quick code to password protect a database using the .htaccess file. I had a script but i cant find it thanks
#programming #databases #htaccess #password #protect
  • Aloha wealthmaker2008

    I just Googled ".htaccess password protect" and found several good articles about doing this. One that seemed to lay it all out in an easy to understand fashion was at "cs.dal.ca/studentservices/faq/tutorials/web_sites/htaccess.shtml"

    Hope this helps

    Bill
  • Hmm... I thought .htaccess was security directories. Didnt know it can secure a database.
    • [1] reply
    • Could you give an example of what you want to achieve in protecting the database?

      Becuase .htacess might not be the best line of attack

      Take care

      Bruce
  • What type of database? Flat files - yes can be protected with htaccess
    sqlite - yes can be protected. Mysql/postresql/mssql/oracle etc... should not need protecting that way and usually have their own login/passwd system.

    Kind regards, Spencer
    • [1] reply
    • I agree with Spencer.

      In fact, I had a script that was using .htaccess to protect the mysql database and it was a MAJOR headache. Everytime you click on ANY link, you would have to sign back into the site.

      I'm not sure if this is normal or a bug in the script, but I don't use it anymore because of the problems I had with it protecting mysql with .htaccess.

      Peace & Prosperity,
      Matt Fulger

Next Topics on Trending Feed