If you refer to a file that does not exist in your webroot, then cake
assumes it is a controller action and runs it through the dispatcher.
So requesting /img/image_that_exists.jpg will return "/app/webroot/img/
image_that_exists.jpg", whereas requesting /img/nonexistant_image.jpg
will attempt to run the ImgController::nonexistant_image action (and
will give a "Missing controller" error if your DEBUG > 1, 404
otherwise).

In both of your cases, the problem will be a relative image path being
used.  So if you are in the /users/index action and have an image link
to "img/something.jpg", the browser will see this as /users/index/img/
something.jpg - and this will run through your /users/index action
again.

The solution - don't use relative images, and try to always use the
Html Helper.  With the favicon - check in your layout as sometimes
there is a favicon link in the <head> tags, and for some reason this
will currently have a relative path (it shouldn't).


And finally, BoSc, I didn't reply to your original query because it
was too verbose, and in the 30 seconds I gave it I couldn't understand
your problem.  Your reply to John was much more succinct :P


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to