CodeIgniter Forums
Problem with routes - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Problem with routes (/showthread.php?tid=37423)



Problem with routes - El Forum - 01-09-2011

[eluser]Unknown[/eluser]
Hi I'm trying to configuring routes that are a little complicated. I have this url:
Code:
www.site.com/album/(album_name)/(album_number)

I want to route it to a a function in my "main" controller called pictures along with the album number. So I wrote a route like this:

Code:
$route['album/:any/(:num)'] = "main/picture/$2"

Keep in mind that the album_name and album_number are both dynamic. I'm not getting a 404 error but I don't think its routing it correctly because I'm not getting any response from the picture function of the controller.

Theres also another route like this:
Code:
$route['album/(:any)'] = "main/album/$1";