title: How to apply codeigniter's URL_TITLE value to the URL
body: <p>I'm completely new to ci,</p>
  
  <p>I have a url something like this:</p>
  
  <pre><code>http://localhost/mvc/post/prod_id/1
  </code></pre>
  
  <p>And I want it to be:</p>
  
  <pre><code>http://localhost/mvc/post/my-best-product
  </code></pre>
  
  <p>So far I'm able to manage to route all that to <code>home/post/</code> and learned the <code>segment</code> function also.</p>
  
  <p>But my question is how do I really get the <code>url_title</code> out to the actual url.</p>
  
  <p>I couldn't find any information on this particular subject. All I could find is how to use the <code>url_title</code> and how to route in ci. But they don't explain how we can actually change the base url name.</p>
  
  <p>Please guide me to the right direction.</p>
  
  <p><strong>solution Example:</strong></p>
  
  <pre><code>public function my_method($product_slug)
  {
      $product1 = "training-for-recruitment";
      $product2 = "training-for-od";
  
      if($product_slug==$product1)
      {
          $this-&gt;load-&gt;view('prod1');
  
      }else if($product_slug==$product2)
      {
          $this-&gt;load-&gt;view('prod2');
  
      }else{
          show_404();
      }
  }
  </code></pre>
  
  <p>This is not what exactly I'm going to do. It is just for others to understand the workaround of Slugs. </p>