CI4 routes doesn't work on production server |
Hi
I noticed CI4 auto routing acts differently on nginx/apache2 server. Let's guess we have controller files - Code: Home.php
It should work. Your server must be misconfigured.
"this doesn't work" doesn't mean anything. What does it do? What's the error message? Without any info it can be anything... (11-08-2021, 01:54 PM)includebeer Wrote: It should work. Your server must be misconfigured. Hi Thanks, I didn't made any special config for nginx server. It is - Code: server { (11-08-2021, 01:54 PM)includebeer Wrote: It should work. Your server must be misconfigured. Also I should clarify - I am trying to use autoroute feature. Guess I have `Blog` Controller with method `details`. If I manually set the route ->add('/blog/details/(:any)') then it works without trouble. But I want it to works automatically because I already have a method called `details`. Why I should implicitly configure it on `Routes.php` for the production server. In localhost:8080 or `php spark serve` I didnot need to specify paths/routes to Routes.php but production level I have to specify. This is the issue here.
It's not a good idea to mix autoroute with configured routes. Choose one or the other.
Maybe go through this check list, it may be a problem with file permissions, etc: https://includebeer.com/en/blog/the-chec...ot-working |
Welcome Guest, Not a member yet? Register Sign In |