CodeIgniter Forums
Routing Issues - $route['(:any)/(:any)'] at the end disturbing other routes - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24)
+--- Thread: Routing Issues - $route['(:any)/(:any)'] at the end disturbing other routes (/showthread.php?tid=76806)



Routing Issues - $route['(:any)/(:any)'] at the end disturbing other routes - anirudh2133 - 06-22-2020

Adding the below routing causing the header to replicate multiple times in the home page and previously used routing pages with single term also not working.

$route['page'] = 'home/page'; //not working
$route['(:any)/(:any)'] //these are working and it is effecting others.

and I am adding it in the end. but the page keeps on loading and hangs.


RE: Routing Issues - $route['(:any)/(:any)'] at the end disturbing other routes - InsiteFX - 06-22-2020

Make sure that it is the last route defined, that's because it's a catch all route.


RE: Routing Issues - $route['(:any)/(:any)'] at the end disturbing other routes - anirudh2133 - 06-22-2020

Yes, I am adding it as the last route and it happen to work in my local so replaced whole code with my local code. It's working now but didn't what caused this problem. Thank you for your response.


RE: Routing Issues - $route['(:any)/(:any)'] at the end disturbing other routes - InsiteFX - 06-23-2020

Some files could have gotten corrupted.

This has happened to be a few times.