title: codeiginiter always shows 404 error ubuntu 14.04
body: <p>I done a project using codeiginiter in windows(XAMPP), now i changed my OS to UBUNTU 14.04 and i have installed LAMP and LAMP works fine.</p>
  
  <p>i copied my project files  to /var/www/html and changed all the configurations to ububtu</p>
  
  <pre><code>$config['base_url'] = 'http://localhost/lankaproperty/';
  
  $config['index_page'] = 'index.php';
  </code></pre>
  
  <p><strong>routes</strong></p>
  
  <pre><code>$route['default_controller'] = 'welcome';
  $route['404_override'] = 'home/error_404';
  $route['500_override'] = 'home/error_500';
  $route['translate_uri_dashes'] = FALSE;
  </code></pre>
  
  <p><strong>.htaccess</strong></p>
  
  <pre><code>RewriteEngine on
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule .* index.php?/$0 [PT,L] 
  </code></pre>
  
  <p>i have also changed all the file permissions to 755..</p>
  
  <p>when i try the default controller like this
     <a href="http://localhost/lankaproperty/" rel="nofollow">http://localhost/lankaproperty/</a>
  it works fine..</p>
  
  <p>but none of the other controller is working</p>
  
  <p><a href="http://localhost/lankaproperty/home" rel="nofollow">http://localhost/lankaproperty/home</a></p>
  
  <p><a href="http://localhost/lankaproperty/index.php?/home" rel="nofollow">http://localhost/lankaproperty/index.php?/home</a></p>
  
  <p>i get the error.</p>
  
  <p>`
  404 Page Not Found</p>
  
  <p>The page you requested was not found.
  `
  can someone help me to fix this issue tnx..</p>
  
  <p><strong>etc/apache2/apache2.conf</strong></p>
  
  <pre><code>    # Sets the default security model of the Apache2 HTTPD server. It does
      # not allow access to the root filesystem outside of /usr/share and /var/www.
      # The former is used by web applications packaged in Debian,
      # the latter may be used for local directories served by the web server. If
      # your system is serving content from a sub-directory in /srv you must allow
      # access here, or in any related virtual host.
      &lt;Directory /&gt;
          Options FollowSymLinks
          AllowOverride All
          Require all denied
      &lt;/Directory&gt;
  
      &lt;Directory /usr/share&gt;
          AllowOverride All
          Require all granted
      &lt;/Directory&gt;
  
      &lt;Directory /var/www/html&gt;
          Options Indexes FollowSymLinks
          AllowOverride All
          Require all granted
      &lt;/Directory&gt;
  </code></pre>
  
  <p><strong>sites-enabled/000-default.conf</strong></p>
  
  <pre><code>    &lt;VirtualHost *:80&gt;
          # The ServerName directive sets the request scheme, hostname and port that
          # the server uses to identify itself. This is used when creating
          # redirection URLs. In the context of virtual hosts, the ServerName
          # specifies what hostname must appear in the request's Host: header to
          # match this virtual host. For the default virtual host (this file) this
          # value is not decisive as it is used as a last resort host regardless.
          # However, you must set it for any further virtual host explicitly.
          #ServerName www.example.com
  
          ServerAdmin webmaster@localhost
          DocumentRoot /var/www/html
  
  
  
          # Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
          # error, crit, alert, emerg.
          # It is also possible to configure the loglevel for particular
          # modules, e.g.
          #LogLevel info ssl:warn
  
          ErrorLog ${APACHE_LOG_DIR}/error.log
          CustomLog ${APACHE_LOG_DIR}/access.log combined
  
          # For most configuration files from conf-available/, which are
          # enabled or disabled at a global level, it is possible to
          # include a line for only one particular virtual host. For example the
          # following line enables the CGI configuration for this host only
          # after it has been globally disabled with "a2disconf".
          #Include conf-available/serve-cgi-bin.conf
      &lt;/VirtualHost&gt;
  
      # vim: syntax=apache ts=4 sw=4 sts=4 sr noet
  </code></pre>
  
  <p><strong>sites-avalible/000-default.conf</strong></p>
  
  <pre><code>    &lt;VirtualHost *:80&gt;
          # The ServerName directive sets the request scheme, hostname and port that
          # the server uses to identify itself. This is used when creating
          # redirection URLs. In the context of virtual hosts, the ServerName
          # specifies what hostname must appear in the request's Host: header to
          # match this virtual host. For the default virtual host (this file) this
          # value is not decisive as it is used as a last resort host regardless.
          # However, you must set it for any further virtual host explicitly.
          #ServerName www.example.com
  
          ServerAdmin webmaster@localhost
          DocumentRoot /var/www/html
  
  
  
          # Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
          # error, crit, alert, emerg.
          # It is also possible to configure the loglevel for particular
          # modules, e.g.
          #LogLevel info ssl:warn
  
          ErrorLog ${APACHE_LOG_DIR}/error.log
          CustomLog ${APACHE_LOG_DIR}/access.log combined
  
          # For most configuration files from conf-available/, which are
          # enabled or disabled at a global level, it is possible to
          # include a line for only one particular virtual host. For example the
          # following line enables the CGI configuration for this host only
          # after it has been globally disabled with "a2disconf".
          #Include conf-available/serve-cgi-bin.conf
      &lt;/VirtualHost&gt;
  
      # vim: syntax=apache ts=4 sw=4 sts=4 sr noet
  </code></pre>