Removing

RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d

and still same thing.

To clear things out:

Admin modules is used only by me - no users login required. So, one htaccess
credentials will do the job. I am looking for a way to protect admin module
via htaccess because I'm lazy to implement PHP auth system for admin module,
and it will be much simpler and secure enough (I hope :)).

I thought creating empty folder in doc root called admin with just .htaccess
and .htpass files will do the job. But probably sth else is required to do
the trick.

I hope it's more clear now what I want to achieve.

Regards,
Saša Stamenković


On Thu, Nov 26, 2009 at 3:35 PM, Daniel Latter <[email protected]> wrote:

> So you have 2 folders called admin? one for module and one off your web
> root?
>
> The problem your getting sound like a DirectoryIndex setting is being
> used, because
> you dont have index.html or index.php in your admin folder,
> furthermore and most importantly
> the htaccess rules you have checks if the directory exists and if it
> does, stop processing, this is what is happening, because you have
> a real directory called admin it is serving that directory, which is
> why your seeing "index of  ..."
>
> Do users have to login to admin section anyway via a username and pass?
>
> Thanks
> Dan
>
>
>
>
>
>
> 2009/11/26 umpirsky <[email protected]>:
> >
> > Hi.
> >
> > I have 2 modules in my app: default and admin module. I want to protect
> my
> > admin module with htaccess.
> >
> > I created admin folder with .htaccess and .htpassword under my document
> > root, but I get Index of /admin page, not my app.
> >
> > My htaccess in doc root is:
> >
> > SetEnv APPLICATION_ENV production
> >
> > RewriteEngine On
> > RewriteBase /
> > RewriteCond %{REQUEST_FILENAME} -s [OR]
> > RewriteCond %{REQUEST_FILENAME} -l [OR]
> > RewriteCond %{REQUEST_FILENAME} -d
> > RewriteRule ^.*$ - [NC,L]
> > RewriteRule ^.*$ index.php [NC,L]
> >
> > Can I protect my admin module this way at all?
> >
> > Regards,
> > Saša Stamenković.
> > --
> > View this message in context:
> http://n4.nabble.com/Modules-and-htaccess-tp788225p788225.html
> > Sent from the Zend Framework mailing list archive at Nabble.com.
> >
>

Reply via email to