2013-12-21

I am learning codeigniter these days. I have done a website for my own use a couple of days ago where i have just applied pagination today but it seems there is problem with my url rewriting.

When i clicked on one of author grabbed it open all albums of selected author. then url looks link www.xyz.com/audio/album-name
Here is my code for this route.

At this stage it works fine. But now today when i applied pagination i found that this route will not do more work for me. I have added pagination in my index action Below you can see my code

This open the details http://localhost/mysite/audio/index/2

against this url my route rule $route['audio/(:any)/(:any)'] = "audio/view_album_details"; works.
It should grab the next page instead of my detail view.

And url should be something like http://localhost/mysite/audio/2

I also tried $route['audio/(:num)'] = "audio/;

I will highly appropriate if anyone can help me in solving this problem.

Show more