CodeIgniter Forums
URL rewriting - Printable Version

+- CodeIgniter Forums (
+-- Forum: Archived Discussions (
+--- Forum: Archived Development & Programming (
+--- Thread: URL rewriting (/thread-53188.html)

URL rewriting - El Forum - 07-13-2012

[eluser]Md. Ruzdi Islam[/eluser]
i want to rewrite url if the pattern is like following
in this url date and package_name will hit the 5th and 6th variable of the method (controller : home, method: index)

i use following which is working well

$route['(^(19|20)\d\d[- /.](0[1-9]|1[012])[- /.](0[1-9]|[12][0-9]|3[01])$)']= "home/index/0/N/DealsAmount/ASC/$1";

but when i user for the 6th parameter ten it goes to 404 page.

$route['(^(19|20)\d\d[- /.](0[1-9]|1[012])[- /.](0[1-9]|[12][0-9]|3[01])$)/(:any)']  = "home/index/0/N/DealsAmount/ASC/$1/$2";

it doesn't work. can you tel me why and what is the solution.

Thanks in advance