CodeIgniter Forums
(newb) ask about routing - 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: (newb) ask about routing (/showthread.php?tid=45641)



(newb) ask about routing - El Forum - 09-29-2011

[eluser]Unknown[/eluser]
hello

im new to ci,
please explain me all about routing url,please explain it detail with an example...

and i want to ask
i use this

$route['default_controller'] = 'pages';
$route['(:any)'] = 'pages/view/$1';

but in browser i should always type this to call my page

http://localhost/code/index.php/home

1.how to hide 'index.php'?! (i just want http://localhost/code/home)
2.how if i want to type anything behind (ex,"http://localhost/code/anything") it always redirect to my page (like url in no.1)?!

thanks!