title: CodeIgniter gives 404 after uploading to server
body: <p>I have a CodeIgniter installation on my local machine. I used <code>hosts</code> file in Windows and Apache config to make it work under my real domain name (eg. <code>site.com</code>). It worked great, so today I uploaded everything to my host. I changed <code>hosts</code> and Apache config, flushed DNS via <code>ipconfig /flushdns</code> and now entering certain URLs (<code>games</code>) gives me 404. </p>
  
  <p>My controller name starts with uppercase but I have routes set like this:</p>
  
  <pre><code>$route['Games/(:num)/(:any)'] = 'Games/Game/$1';
  $route['games/(:num)/(:any)'] = 'Games/Game/$1';
  </code></pre>
  
  <p>Either entering this by <code>games/14/game</code> or <code>Games/14/game</code> doesn't work.</p>
  
  <p>Searching for images (using <a href="https://stackoverflow.com/questions/11100706/codeigniter-doesnt-see-images-using-file-exists">solution given by merahulpk</a>)  doesn't work also.</p>
  
  <p>What can it be?</p>
  
  <p>Unfortunately, it's still under development, so I can't give you the aaddess just yet. </p>
  
  <p>-- edit --</p>
  
  <p>Image inclusion script:</p>
  
  <p><code>views/game.php</code></p>
  
  <pre><code>&lt;?php
      $image_path = $this-&gt;config-&gt;item('base_path').'images/games/'.$info['id'].'-s.jpg';
      if(file_exists($image_path)) {
          $small = $this-&gt;config-&gt;item('base_url').'images/games/'.$info['id'].'-s.jpg';
          $big = $this-&gt;config-&gt;item('base_url').'images/games/'.$info['id'].'-b.jpg';
      } else {
          $small = $this-&gt;config-&gt;item('base_url').'images/games/none-m.png';
          $big = $this-&gt;config-&gt;item('base_url').'images/games/none-m.png';
      }
  ?&gt;
  </code></pre>
  
  <p><code>config/sit-config.php</code></p>
  
  <pre><code>&lt;?php
  
  $config['base_url'] = "http://".$_SERVER['SERVER_NAME'] . str_replace(basename($_SERVER['SCRIPT_NAME']),"",$_SERVER['SCRIPT_NAME']);
  
  if(!defined('DOCUMENT_ROOT')) define('DOCUMENT_ROOT',str_replace('system/application/config','',substr(__FILE__, 0, strrpos(__FILE__, '/'))));
  
  $config['base_path']    =   constant("DOCUMENT_ROOT");
  ?&gt;
  </code></pre>