title: Hiding Default Controller Name in Codeigniter
body: <p>When my website opens for the first time , it directly goes to this address: <a href="http://www.website.com/tr/main" rel="nofollow">http://www.website.com/tr/main</a></p>
  
  <p>But I want my link to be like this: <a href="http://www.website.com/" rel="nofollow">http://www.website.com/</a>
  I can't remove "tr/main" links. How can I solve this problem?</p>
  
  <p><strong>Php Code:</strong></p>
  
  <pre><code>$route['default_controller'] = "main";
  $route['404_override'] = '';
  $route['(tr|en)/(.+)$'] = '$2';
  $route['(tr|en)$'] = $route['default_controller'];
  </code></pre>
  
  <p><strong>Htaccess Code:</strong> </p>
  
  <pre><code>RewriteEngine On
  
  # Put your installation directory here:
  # If your URL is www.example.com/, use /
  # If your URL is www.example.com/site_folder/, use /site_folder/
  
  RewriteBase /
  
  # Do not enable rewriting for files or directories that exist
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  
  # For reuests that are not actual files or directories,
  # Rewrite to index.php/URL
  RewriteRule ^(.*)$ index.php/$1 [PT,L]  
  </code></pre>