CodeIgniter Forums
Custom URLs - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Custom URLs (/showthread.php?tid=27506)



Custom URLs - El Forum - 02-12-2010

[eluser]ram4nd[/eluser]
I have URL that looks like:
example.com/controller/index/item_name

I would like to make it shorter, without the function name like:
example.com/controller/item_name

Where should I start or how can I get to result I need.


Custom URLs - El Forum - 02-12-2010

[eluser]Dyllon[/eluser]
URI Routing


Custom URLs - El Forum - 02-12-2010

[eluser]ram4nd[/eluser]
stuped me, thanks anyway


Custom URLs - El Forum - 02-12-2010

[eluser]tomcode[/eluser]
You can also use Remapping


Custom URLs - El Forum - 02-13-2010

[eluser]ram4nd[/eluser]
How can i get arguments from Remapping???


Custom URLs - El Forum - 02-13-2010

[eluser]tomcode[/eluser]
Code:
function _remap($method)
{
    // $method defaults to index

    $segments = $this->uri->segment_array();
}

see also the URI Class