![]() |
Route not work with regex - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28) +--- Forum: CodeIgniter 4 Support (https://forum.codeigniter.com/forumdisplay.php?fid=30) +--- Thread: Route not work with regex (/showthread.php?tid=81148) |
Route not work with regex - mylastof - 01-27-2022 I have reoutes with custom placeholder like: Code: // route Code: // controller When accessed like http://localhost:8080/all show Code: all but when accessed with http://localhost:8080/all/done just show 404. by edit the route with Code: $routes->get('(:unique)/(:any)', 'Pages::browse/$1/$2'); Code: all whats wrong with the regex? RE: Route not work with regex - kenjis - 01-27-2022 Check the route regex with `php spark routes`. RE: Route not work with regex - iRedds - 01-27-2022 PHP Code: $routes->addPlaceholder('unique', '[a-z0-9]{40}|all'); RE: Route not work with regex - mylastof - 01-28-2022 (01-27-2022, 11:43 PM)iRedds Wrote: Thanks @iRedds |