title: Codeigniter 404 issue on every URL other than index
body: <p>So I have got a client who has website in CI .</p>
  
  <p>When i downloaded the website and try to host it . The index page is loading but other than all other links are giving <code>404 ERROR</code></p>
  
  <p>the route looks like this</p>
  
  <pre><code>&lt;?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
  
  
  
  $route['default_controller'] = "chipili";
  $route['404_override'] = '';
  
  
  $route['how-it-works']      = "chipili/Commentcamarche/";
  </code></pre>
  
  <p>The chipili Controller is like this</p>
  
  <pre><code>&lt;?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
  
  class Chipili extends CI_Controller {
  
      protected $data = array();
  
      function __construct ()
      {
  
          parent::__construct();
          $this-&gt;data['title'] = 'domain : un spectacle à la maison';
          $this-&gt;data['meta_title'] = 'domain : un spectacle à la maison';
          $this-&gt;data['meta_desc'] = 'domain : un spectacle à la maison';
  
          //$this-&gt;data['lang'] = 'fr';
          $this-&gt;data['content']  = 'index/index';
  
          //$this-&gt;redirectCountry();
  
      }
  
      public function redirectCountry() {
          include(APPPATH.'libraries/geoplugin.php');
          $geoplugin = new geoPlugin();
          $geoplugin-&gt;locate();
          $country_code = $geoplugin-&gt;countryCode;
  
          if($country_code == 'FR'){
                  if($_SERVER['SERVER_NAME'] != 'www.domain.com'){
                      header('Location: http://www.domain.com');
                  }
          }
          elseif ($country_code == 'AE'){
              if($_SERVER['SERVER_NAME'] != 'ae.domain.com'){
                      header('Location: http://ae.domain.com');
              }
          }
  
      }
  
      /**
       * Index Page for this controller.
       *
       * 
       */
  
      public function set_language () {       
          switch ($_SERVER['SERVER_NAME']){
              case 'www.domain.com':
                  $this-&gt;session-&gt;set_userdata('lang', 'fr');
                  break;
              case 'en.domain.com';
                  $this-&gt;session-&gt;set_userdata('lang', 'en');
                  break;
              case 'ae.domain.com';
                  $this-&gt;session-&gt;set_userdata('lang', 'ae');
                  break;
              default:
                  $this-&gt;session-&gt;set_userdata('lang', 'fr');
                  break;  
          }
      }
  
      public function index()
      {
  
  
          $this-&gt;set_language();
          $this-&gt;lang-&gt;load('index', $this-&gt;session-&gt;userdata('lang'));
  
          $this-&gt;data['title'] = $this-&gt;lang-&gt;line('title');
          $this-&gt;data['meta_title'] = $this-&gt;lang-&gt;line('meta_title');
          $this-&gt;data['meta_desc'] = $this-&gt;lang-&gt;line('meta_desc');
          $this-&gt;data['content']  = 'index/index';
  
          $this-&gt;load-&gt;vars($this-&gt;data);
          $this-&gt;load-&gt;view('template');
      }
   /**
   * Page Comment ca marche
   * url : concert-et-spectacle-a-domicile
   * 
   */
  
  public function Commentcamarche () {
      $this-&gt;data['title'] = "How it work";
      $this-&gt;data['meta_title'] = "How it work";
      $this-&gt;data['meta_desc'] = "How it work";
  
      $this-&gt;data['content']  = 'chipili/commentcamarche';
  
      $this-&gt;load-&gt;vars($this-&gt;data);
      $this-&gt;load-&gt;view('template');
  }
  
  }
  </code></pre>
  
  <p><strong>.htaccess</strong></p>
  
  <pre><code>AddCharset UTF-8 .html
  
  Options +FollowSymlinks
  
  ExpiresActive On
  
  ExpiresByType image/gif "access plus 1 months"
  ExpiresByType image/jpeg "access plus 1 months"
  ExpiresByType image/png "access plus 1 months"
  ExpiresByType text/css "access plus 1 months"
  ExpiresByType text/javascript "access plus 1 months"
  ExpiresByType application/javascript "access plus 1 months"
  
  RewriteEngine On
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule ^(.*)$ index.php/$1 [L]
  
  RewriteCond $1 !^(index\.php|public|css|js|robots\.txt|citelis|cgi-bin|medias|uploads|favicon\.ico|sitemap\.xml)  
  
  Options +FollowSymlinks
  php_flag display_errors on
  </code></pre>
  
  <p>I am a Laravel Dev from my experience i feel it might be permission issue with the folder .</p>
  
  <p>Would be glad if some one could help</p>