Urls with more parameters do not work |
Hi,
I make routes rule : PHP Code: $route['price_list_details/:any'] = 'products/details'; http://local-wprods.com/price_list_detai...t42-laptop But when I tried to add more parameters, like : http://local-wprods.com/price_list_detai...er_title/a I got error url not found. codeigniter version: 3.1.0, PHP Code: In config : $config['permitted_uri_chars'] = 'a-z 0-9~%.:&_\-+,\.\/'; Thanks!
(:num) will match a segment containing only numbers. (:any) will match a segment containing any character (except for ‘/’, which is the segment delimiter).
With regular expressions, you can also catch multiple segments at once. For example, if a user accesses a password protected area of your web application and you wish to be able to redirect them back to the same page after they log in, you may find this example useful: PHP Code: $route['login/(.+)'] = 'auth/login/$1'; What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
|
Welcome Guest, Not a member yet? Register Sign In |