title: 404 Page Not Found codeigniter url
body: <p>I am a beginner using codeigniter. I am using following url "<a href="http://localhost/ci/index.php/shopcart" rel="nofollow">http://localhost/ci/index.php/shopcart</a>" to access the controller and I am getting error 404 page not found</p>
  
  <h2>Controller Code</h2>
  
  <pre><code>     &lt;?php
  
      class Cart extends CI_Controller { // Our Cart class extends the Controller class
  
          function Cart()
          {
              parent::CI_Controller(); // We define the the Controller class is the parent. 
  
          }
  
  
      }
  
          function index()
          {
              $this-&gt;load-&gt;model('cart_model'); // Load our cart model for our entire class 
              $data['products'] = $this-&gt;cart_model-&gt;retrieve_products(); // Retrieve an array with all products
              $data['content'] = 'cart/products'; // Select our view file that will display our products
              $this-&gt;load-&gt;view('index', $data); // Display the page with the above defined content
          }
  ?&gt;
  </code></pre>
  
  <h2>Model Code</h2>
  
  <pre><code>&lt;?php 
  
  class Cart_model extends Model { // Our Cart_model class extends the Model class
  // Function to retrieve an array with all product information
      function retrieve_products(){
          $query = $this-&gt;db-&gt;get('products'); // Select the table products
          return $query-&gt;result_array(); // Return the results in a array.
      }  
  
  }
  </code></pre>
  
  <h2>Route</h2>
  
  <pre><code>$route['default_controller'] = "shopcart";
  </code></pre>
  
  <h2>autoload</h2>
  
  <pre><code>$autoload['libraries'] = array('cart' , 'database');
  $autoload['helper'] = array('form');
  </code></pre>