404... That really shouldn't be

#1
[eluser]Unknown[/eluser]
Hello,

So, I have been reading the documentation and I am trying to figure out how to get a controller I made to work. The URL is supposed to be http://jessicasideways.info/higherone/ and it is using a controller at application/controllers/higherone.php that has this code:

Code:
<?php

class HigherOne extends CI_Controller {

public function view($page = 'home') {
  if ( ! file_exists('application/views/higherone/'.$page.'.php')) {
   // Whoops, we don't have a page for that!
   show_404();
  }

  $data['title'] = ucfirst($page); // Capitalize the first letter

  $this->load->view('templates/higherone_header', $data);
  $this->load->view('higherone/'.$page, $data);
  $this->load->view('templates/higherone_footer', $data);
}
}
?>

(and the reason why I am not using the pages controller is because I want to use custom headers & footers for mini sites I create on this domain, like this one).

This is what routes I have defined:
Code:
$route['default_controller'] = "welcome";
$route['404_override'] = '';
$route['higherone/'] = 'higherone/view';
$route['higherone/:any'] = 'higherone/view/$1';

So, what am I doing wrong?


Messages In This Thread
404... That really shouldn't be - by El Forum - 11-15-2013, 11:24 AM
404... That really shouldn't be - by El Forum - 11-15-2013, 05:21 PM
404... That really shouldn't be - by El Forum - 11-15-2013, 07:37 PM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.