Codeigniter URI Routing
Posted
by
justin
on Stack Overflow
See other posts from Stack Overflow
or by justin
Published on 2012-06-04T15:32:18Z
Indexed on
2012/06/04
16:40 UTC
Read the original article
Hit count: 281
codeigniter
|codeigniter-url
I have check the codeigniter user guide, But I was not lucky to solve my problem.
I have created a webpage on my localhost.
When I go to http://localhost/webpage/
it is okay. It will go to the default controller.
My default controller is Homepage
and there are methods named index
, guarantee
and about
When I go to my routes.php, I added this:
$route['guarantee'] = "homepage/guarantee";
$route['about_us'] = "homepage/about";
Then try to access it http://localhost/webpage/guarantee
and http://localhost/webpage/about_us
it show ERROR 404
But when I do it like this $route['default_controller'] = "homepage/guarantee";
The guarantee page will be displayed.
Can anyone help me with this issue? Thanks.
© Stack Overflow or respective owner