[eluser]IamPrototype[/eluser]
[quote author="Dyllon" date="1232421660"]I had to do this a while ago, I didn't want to use URL suffixes so I extended the CI Router as follows
application/libraries/My_Router.php
Code:
class MY_Router extends CI_Router {
function MY_Router()
{
parent::CI_Router();
}
function _validate_request($segments)
{
// Does the requested controller NOT exist?
if (!file_exists(APPPATH.'controllers/'.$segments[0].EXT))
{
$segments = array("users","profile",$segments[0]);
}
}
return parent::_validate_request($segments);
}
[/quote]
So that is basically the same, just another code. I guess I'll have to auto-load the library, right? And then it would work if my controller is named users, and function profile.