I usually add this to my .htaccess files:
# Do not route missing asset requests through cake
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !img/titles
RewriteRule ^/?((img|js|css|swf)/.*)$ - [R=404,L]
The img/titles rule is an exception because those can be dynamically
generated through cake.
An incorrectly named img tag on a certain page played havoc with the
sessions during development; since then I take this approach, and my
desk is acquiring fewer and fewer head-shaped indentations.
hth
grigri
On Jan 16, 12:46 pm, Adam Royle <[email protected]> wrote:
> This error happens when the image doesn't exist, and the request is
> forwarded to cakephp. Make sure the file is there and case-sensitive
> if on linux.
>
> Cheers,
> Adam
>
> On Jan 16, 8:48 pm, g4b0 <[email protected]> wrote:
>
> > Hi all,
> > I'm trying to put some images in /app/webroot/img/photo, but the
> > following html doesn't display anything:
>
> > <img src="/img/photo/HawaiiSurf.jpg" alt="" />
>
> > In addiction, if I point my broser directly
> > tohttp://mysite.com/img/photo/HawaiiSurf.jpg
> > I get this:
>
> > Missing Controller
> > Error: ImgController could not be found.
> > Error: Create the class ImgController below in file: app/controllers/
> > img_controller.php
>
> > <?php
> > class ImgController extends AppController {
>
> > var $name = 'Img';}
>
> > ?>
>
> > How can I solve it?
>
> > Thanks a lot
> > g4b0
--~--~---------~--~----~------------~-------~--~----~
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]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---