htpasswd, secure specific files in zend framework

Posted by AKFourSeven on Stack Overflow See other posts from Stack Overflow or by AKFourSeven
Published on 2012-06-13T10:35:58Z Indexed on 2012/06/13 10:39 UTC
Read the original article Hit count: 214

Hi I have been bashing my head against the wall with this riddle and cannot find the way to solve this.

I would like to secure couple of files to restrict access to certain pages but my attempts so far are unsuccessful.

I do not want to use Zend Auth as it is a very small web site doing simple stuff.

Here is a sample of what I have done:

AuthUserFile /path/to/my/.htpasswd
AuthName "Admin Restriction"
AuthType Basic
<Files file.phtml>
    require valid-user
</Files>

Is there any way to achieve this ?

© Stack Overflow or respective owner

Related posts about zend-framework

Related posts about .htaccess