title: How to rewrite an URL to a specific controller class with htaccess file in codeigniter
body: <p>I have 2 controller classes in my application named Localhost/electronics.  </p>
  
  <p>The URL <code>"Localhost/electronics/cameras"</code> goes to  </p>
  
  <pre><code>"localhost/electronics/home/details/cameras". 
  </code></pre>
  
  <p>This is happening because of the rule  </p>
  
  <pre><code>$route['(:any)'] = "home/details/$1";
  </code></pre>
  
  <p>2nd controller class <code>specifics()</code> and it's method <code>showspecifics()</code> is accessed through URL</p>
  
  <pre><code>`"localhost/electronics/specifics/showspecifics/camera1.` 
  </code></pre>
  
  <p><strong>How can I do the following?</strong></p>
  
  <p>Only with the help <code>.HTaccess</code> file, I want to.. be able to access the second class <code>specifics()</code> using URL </p>
  
  <pre><code>`"localhost/electronics/camera1` . 
  </code></pre>
  
  <p>I am aware that using </p>
  
  <pre><code>`$route['(controllername/:any)'] = "specifics/showspecifics/$1";`
  </code></pre>
  
  <p>is a possible way close to achieving the clean URL but it's not what I want. </p>
  
  <p>Please advise as to how to use htaccess to accomplish this.</p>
  
  <p>Any idea is greatly appreciated.</p>