take out control and view in the url |
[eluser]wan19800[/eluser]
does anyone know how to take out control and view in the url structure in codeigniter ex) http://www.url.com/control/view/segment3 to http://www.url.com/segment3 I try .htaccess, it does not work. any suggestions?? thanks
[eluser]gon[/eluser]
EDIT: Try setting a route: Code: $routes["(:any)"] = "controller/action/$1"; You only can access one controller and action though.
[eluser]wan19800[/eluser]
nothing seems to work I try $route['search'] = "controller"; $route["(:any)"] = "controller/view/$1"; and I want to pass http://www.url.com/control/view/segment3 to http://www.url.com/segment3 the segment3 will not pass value
[eluser]gon[/eluser]
Using the route I proposed, the argument should be passed to the action, as in a normal URL: /controller/action/arg1/arg2 in this example the action() method would get 2 params: the values arg1 and arg2. |
Welcome Guest, Not a member yet? Register Sign In |