Cakephp - MissingControllerException Controller class Robots.txt

1.6k views Asked by At

My error log is loaded with all of the missing errors, for robots.txt, .css files, .png files and more. The site works, but getting errors. How do I get rid of these errors? I feel like I'm missing something simple, maybe a route or something?

2016-05-07 16:11:20 Error: [MissingControllerException] Controller class Robots.txtController could not be found.
#0 /app/webroot/index.php(93): Dispatcher->dispatch(Object(CakeRequest), Object(CakeResponse))
#1 {main}
2016-05-07 16:32:50 Error: [MissingControllerException] Controller class CssController could not be found.
#0 /app/webroot/index.php(93): Dispatcher->dispatch(Object(CakeRequest), Object(CakeResponse))
#1 {main}
1

There are 1 answers

2
yBrodsky On

If you try to fetch a resource that doesnt not exist, cake will try to find a controller by that name. So if you try to access /css/whatever and you have no css folder, cake will try to find a CssController to take you to /:controller/:action