title: Unable to route to static PHP page in CodeIgniter
body: <p>I'm a newbie to CodeIgniter. In my 'views' folder, I've created 2 PHP pages - home.php and register.php. I've also created the header and footer PHP pages in a templates folder.</p>
  
  <p>Here is my pages.php code which is the controller class:</p>
  
  <pre><code>&lt;?php
  class Pages extends CI_Controller
  {
      public function view($page)
      {
          if(!file_exists(APPPATH.'/views/pages/'.$page.'.php'))
          {
              show_404();
          }
          $data['title'] = ucfirst($page);
          $this-&gt;load-&gt;view('templates/header', $data);
          $this-&gt;load-&gt;view('pages/'.$page, $data);
          $this-&gt;load-&gt;view('templates/footer', $data);
      }
  }
  </code></pre>
  
  <p>and here is my routes.php code:</p>
  
  <pre><code>$route['register'] = "pages/view/register";
  $route['default_controller'] = 'pages/view/home';
  </code></pre>
  
  <p>I have not yet written anything into the .htaccess file.</p>
  
  <p>My project home directory is 'ED'</p>
  
  <p>I am able to navigate to the home page with this URL: <a href="http://localhost/ED" rel="nofollow">http://localhost/ED</a></p>
  
  <p>However I'm unable to navigate to the registration page with these URLs:
  localhost/ED/register</p>
  
  <p>or</p>
  
  <p>localhost/ED/register.php</p>
  
  <p>Please help as to how can I achieve this.</p>