I have a website using Silex.
I have uploaded few files in root folder like robots.txt and few push notifications sdk.
Problem is getting error when I am trying to access that file using url :
domain.com/robots.txt is giving error when trying to access from chrome browsers
No route found for GET /robot.txt
Fatal error: Uncaught exception 'Symfony\Component\Routing\Exception\RouteNotFoundException' with message 'Unable to generate a URL for the named route "" as such route does not exist.' in /home/path/domain.com/vendor/symfony/routing/Symfony/Component/Routing/Generator/UrlGenerator.php:134 Stack trace: #0 /home/path/domain.com/vendor/symfony/twig-bridge/Symfony/Bridge/Twig/Extension/RoutingExtension.php(45): Symfony\Component\Routing\Generator\UrlGenerator->generate(NULL, NULL, false) #1 /home/path/domain.com/data/twig/fe/bb/cd3e9843c1ef02ee591d59cfb1afd51eb5cd52af42e38573c035f7ef4128.php(146): Symfony\Bridge\Twig\Extension\RoutingExtension->getPath(NULL, NULL) #2 /home/path/domain.com/vendor/twig/twig/lib/Twig/Template.php(276): __TwigTemplate_febbcd3e9843c1ef02ee591d59cfb1afd51eb5cd52af42e38573c035f7ef4128-doDisplay(Array, Array) #3 /home/path/domain.com/vendor/twig/twig/lib/Twig/Template.php(250): Twig_Template->displayWithErrorHandling(Array, Array) #4 /home/path/domain in /home/path/domain.com/vendor/twig/twig/lib/Twig/Template.php on line 291
/robots.txtbut you don't create a controller forrobots.txt, you can't access it. If you really want to access it with an URL, just create a controller like$app->get('/robot') ...and the view will just berobots.txt- Mickaƫl Leger