If your listing the files of a directory from a controller and displaying it in a view then htaccess won't help you here.
If there are only a few files that need to be protected from view then i would keep an array of paths to match against and if the path matches i wouldn't display it. On Friday, June 8, 2012 12:01:39 PM UTC+2, heohni wrote: > > Hi, > > I have a view to list all files from a files directory. > For this view, I would like to use a simple htaccess / htpasswd protection. > It's just for internal use to exchange files, so no complex auth is needed. > > I copied the htaccess into the view folder, but when I call the page there > is no protection, I can see the view just like this. > > What I did now, I copied the htaccess into the files folder so at least > the files are protected. > But the view is not protected. Does anyone know a way to protect also the > view file? > > Thanks > > -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php