CodeIgniter Forums
first segment in uri - 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: first segment in uri (/showthread.php?tid=12545)



first segment in uri - El Forum - 10-22-2008

[eluser]dbashyal[/eluser]
is it possible to put dash in uri 1st segment

Quote:i.e. inplace of 'aboutus' can it be 'about-us' but load controller 'aboutus' no dash.

if yes, how can i do it?

Thank you.


first segment in uri - El Forum - 10-22-2008

[eluser]Randy Casburn[/eluser]
pfft pfft...the things some people due to make their lives so darn difficult...

Yes...it's possible. Look at the user guide under the Routing class. You'll have to establish a custom route to your controller.

Randy