edit:
Solved – mod_rewrite was the problem
I can’t get CI to work as described in the tutorial.
No matter how I fiddle with the path or the settings – it is not working
My Setup:
- ubuntu on local machine
- no
.htaccess - default routing
- config:
$config['base_url'] = 'http://localhost/~myuser/ci/';$config['index_page'] = 'index.php';$config['uri_protocol'] = 'AUTO';
- one controller named users.php class Users with a “listone” method
I try calling
- http://localhost/~myuser/ci/index.php?users/listone -> welcome page
- http://localhost/~myuser/ci/index.php/users/listone -> 404
I had different routing configured, to use users/listone as default. That was working, but then I was unable to access other methods.
What am I doing wrong? I tried to follow the tutorial, but it seems as if its not working as described.
edit:
even with a slash at the end of base_url its not working, neither when empty
i get a server 404 when I call index.php/users/listone , not the one CI has.
The controller: added a index-method. – which is not reachable
<?php
class Users extends CI_Controller {
public function listone($page = 'listall')
{
echo $page;
}
public function index()
{
echo 'listone';
}
}
Problem solved:
My test-system was missing mod_rewrite.
An indicator for that problem might be, that calling
http://host/directory/index.php/conntrollershows a 404. – not a CodeIgniter-404, but a apache 404.Thanks all for helping me.