Trick to delete controller in query string |
[eluser]Cahyono[/eluser]
I try to change http://localhost/index.php?c=welcome&m=home into http://localhost/index.php?m=home So I want to delete c=welcome from URL so that shorter. After trial and error, I found like this: in file system\application\config\routes.php : Code: $route['default_controller'] = "welcome"; in file system\Libraries\Router.php search on function _validate_request($segments): Code: // Can't find the requested controller... Add above so become this below: Code: $segments[0] = $this->default_controller; That's it. It's work fine to me. |
Messages In This Thread |
Trick to delete controller in query string - by El Forum - 12-01-2008, 07:30 PM
Trick to delete controller in query string - by El Forum - 12-01-2008, 08:25 PM
Trick to delete controller in query string - by El Forum - 12-01-2008, 10:48 PM
Trick to delete controller in query string - by El Forum - 12-02-2008, 10:28 PM
|