views:

58

answers:

1

Hello,

I am developing a web application using CI at www.example.com . My CI install is located outside the www root folder.

How do I go about password protecting my application while still allowing my "home page" (in this case the default controller/view in CI ) to be publicly accessible ?

I.E. I want to develop my application without any authorized users (i.e. the public) poking around, but still want a landing page to be visible.

I've been able to use .htaccess to password protect my entire www root, is there anyway to exclude the home page from protection ? And if so, what file would I exclude in my CI setup ?

Any ideas on how this is accomplished on a generic (non codeigniter) website / web application would also be appreciated

A: 

To exclude specific pages from being password protected, for example page.html you would add the following to your .htaccess file:

<Files "page.html">
  Allow from all
  Satisfy any
</Files>

You can see examples of how to do this, as well as how to exclude multiple files here.

Mitchell McKenna