CodeIgniter Forums
URL rewriting - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- 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

www.mydomain.com/date/package_name
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

Code:
$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.

Code:
$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
Ruzdi