http://www.thomsonchemmanoor.com/16-useful-htaccess-tricks-and-hacks-for-web-developers.html
On Feb 1, 1:17 am, mackeian <marer...@gmail.com> wrote:
> I'm currently working on a community-like page, where gallery-images
> exists. These images should not be accessed to anyone not logged in to
> the community, for example, no one should be able to writehttp://myhost/images/image1.jpgwhen not logged in.
>
> I first thought of using .htaccess for that specific image-folder in
> webroot, but then each user have to fill in this user/password as well
> (as his login/pass to the site itself), and that seems a little
> annoying. But that could be an option.
>
> Instead I put all images outside the webroot-folder (in /app/images/),
> and access them via the Media View (see Views in Cakephp Manual). This
> works fine, but performance is really slow, since it takes a php-
> action call for every image loaded (e.g. /Images/getImage/31), and
> when showing 30 thumbnails this takes some time.
>
> I would like to point directly to the image (for performance reasons).
> Anyone out there knows of a better way to "protect" files from anyone
> not logged in to the site?
>
> Thank you.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---
No comments:
Post a Comment