Take the 2-minute tour ×

When I upload my fully working codeigniter app on live server it did not find any controller and cotroller action.

For example:

my local url is:


Yes, It works fine, But when I upload the same thing and url becomes:


It does not work. Shows error that cant fine the controller. I am wondering why it is happening so while it is working on local server. Kindly help

controller code:

class Ajaxification extends CI_Controller{
    public function __construct() {
    public function Index(){

    public function getUserDetail(){
        $uid = $_REQUEST['uid'];
        echo $this->MAjaxification->getUserdetail($uid);
       // echo "A test response";
    public function getRandomUser(){
       $top = $_REQUEST['top'];
       $left = $_REQUEST['lef'];
      // $this->load->model('MAjaxification');
     //  print_r($this->MAjaxification->getRandomDonoers());*/
        $res= $this->db->get();

        foreach ($res->result() as $row)
          ?> <div style="border:0px solid black; width: 31px; height: 29px; float: left;">
        <a onclick="getUserinfoDetail('<?=$row->userid?>')" href="javascript:void(0)"><img width="40" height="40" src="../profile_pix/<?=$row->pic; ?>" /></a>


    private function countUsers(){
        return $res->num_rows();
    function getRandUser($f=1,$t){
       $index = rand($f, $t);
       return $index;
    public function testme(){
        echo "This is a test";
share|improve this question
Can you provide us with link to site? It might be misconfigured install or are you sure you have uploaded all files? –  Raimonds Oct 1 '11 at 9:01
dustyfeet.designers99.com/index.php/ajaxification/testme You can see that dustyfeet.designers99.com is working my base_url is: $config['base_url'] = 'dustyfeet.designers99.com/';; –  Kannu Oct 1 '11 at 9:10
Check CASE of filename. –  Usman Oct 1 '11 at 9:13
Other Controllers looks like work, are you sure there is this controller? Please paste the code of that controller please? –  Raimonds Oct 1 '11 at 9:16
Yes, it is working on my local server –  Kannu Oct 1 '11 at 9:18

2 Answers 2

up vote 2 down vote accepted

I never worked with Codeigniter, but if it is similar to Kohana, you have to setup the base_url. [EDIT] Check this post from CodeIgniter forum: https://github.com/EllisLab/CodeIgniter/wiki/Automatic-configbase-url

share|improve this answer
base_url is alreay set up and working –  Kannu Oct 1 '11 at 8:52

I think this problem may be related to some configs in application config folder routes.php :

  • $route['default_controller'] you should be set it to the default controller

    config.php :

  • $config['base_url'] should be '' if you used the htaccess rules to remove index.php in the URL and also the .htaccess file in the app directory may be causing this problem

Also the controller filename must be the same name of the class which extends the CI_Controller

share|improve this answer

Your Answer


