Welcome Guest, Not a member yet? Register   Sign In
Strange 404 routes when having a specific file in /public/
#2

php routing starts working if the resource specified in the url does not exist.

For url example.com/products.txt
the server will first look for the public/products.txt file, and if the file is not found, the server will pass control to the framework's routing.

For url example.com/products/show/1
first, the server will look for the file public/products/show/1, and if the file is not found, the server will pass control to the framework's routing.

If you get a 404 for /products/show/1, then there is no "public/products/show/1" file, or there is no "ProductsController" controller, or there is no "show" method in this controller, or this method returns 404.
Or your web server is not configured.
Reply


Messages In This Thread
RE: Strange 404 routes when having a specific file in /public/ - by iRedds - 03-10-2023, 05:51 PM



Theme © iAndrew 2016 - Forum software by © MyBB