My Slim is working well in my development env (a virtual host in my apache config).
But trying to run it using the PHP webserver gives strange results on some pages I’ll try to explain what happens.
php -S localhost:8888 from my public directory, that contains the
index.php main file.
I’ve a page that should display a map, and have to load CSS, JS and images.
I’ve a route for the page itself, and another one to load resources, since they’re out of the public directory.
http://localhost:8888/plugins/maps/carte show the page, but resource calls, like
http://localhost:8888/plugins/plugin-maps/res/images/maps.png don’t work.
I have a 404 error on this last call; that come directly from the webserver and not from Slim.
But if I change the URL to
http://localhost:8888/index.php/plugins/plugin-maps/res/images/maps.png (note the add of
/index.php); I can get the image!
Well, that could be logic; but I do not understand why some routes works well without
index.php and others don’t… Could someone explain what I’m missing?
For reference, the resource route is defined here: