Remove index from URL |
[eluser]harmstra[/eluser]
I have a fresh installed CI. I created one controller, index.php Contents: Code: function index() Routes: Code: $route['default_controller'] = "index"; Config: Code: $config['index_page'] = ""; htacces: Code: RewriteEngine on When i go to www.domain.com, 'index' is echood on screen When i go to www.domain.com/index, 'index' is echood on screen When i go to www.domain.com/index/test, 'test' is echood on screen When i go to www.domain.com/test , PAGE NOT FOUND How do i get www.domain.com/test working?
[eluser]xwero[/eluser]
www.domain.com/test is not working because CI thinks you are looking for a controller named test not a method test of the class index. You can make it work with a route Code: $route['(test)'] = 'index/$1';
|
Welcome Guest, Not a member yet? Register Sign In |