• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Basic HTTP authentication - password protect a directory

Ho do I password protect a directory using basic HTTP authentication - i.e. the basic popup username password combo?

I want to protect the /admin/ directory and don't want to have to implement a login script for every controller and function there in.

The problem is the admin directory does not actually exist - it is just the path created by CI. If I try creating it and protecting it the normal way I get a 404.

This is on a live site (eek!) so any suggestions would be appreciated


I'd like to know the answer to this one as well.

I'd like a url /admin/, which goes to admin controller. Normally I'd stick a .htaccess file in the folder, but obviously with the way CI works, there *is* no folder.

Found this thread,
but can't figure it out how he did it.

Read these!

.htaccess Tips and Tricks Part-1

more .htaccess tips and tricks..

htpasswd - Manage user files for basic authentication


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.