it wont pick up actions for the webroot because the webroot isn't subject to any controller action - the .htaccess is rewriting the URL and directing the request at a physical location etc etc.
One way you could do it is to create a media view for your images and force all your images through a controller. It may be slower than serving up static content. Of course, if all you want to know is IF someone is accessing your images under webroot (but you don't care whether they do or when they did) you can always inspect your httpd logs after the fact. On Fri, Sep 14, 2012 at 9:54 AM, andrewperk <[email protected]> wrote: > Hello, > > I'd like to be able to know if someone is directly accessing images from > my /webroot/img directory. Is this possible? > > For instance if they type in: http://mydomain/img/picture.jpg > > I should be able to check for this in my beforeFilter like I can for my > actions, but it doesn't seem to pick up requests from webroot. > > Thanks, > > Andrew > > -- > You received this message because you are subscribed to the Google Groups > "CakePHP" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > Visit this group at http://groups.google.com/group/cake-php?hl=en-US. > > > -- You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. Visit this group at http://groups.google.com/group/cake-php?hl=en-US.
