title: CodeIgniter internal redirect
body: <p>I want to handle all requests with one controller and I have a route </p>
  
  <pre><code>$route['(:any)'] = 'links/index/$1';
  </code></pre>
  
  <p>and table in my database(screenshot below)</p>
  
  <p><img src="https://i.stack.imgur.com/QB0KQ.png" alt="Image"></p>
  
  <p>So when URL is mydomain.com/first-article I am selecting from database controller, action, and table-id and I want to redirect to articles controller, article action and pass table_id.
  How can I do it?</p>
  
  <p>Also I need to keep URL </p>
  
  <blockquote>
    <p>mydomain.com/first-article</p>
  </blockquote>
  
  <p>Then I redirecting with redirect() I am getting error:</p>
  
  <pre><code>ERR_TOO_MANY_REDIRECTS, because of $route['(:any)'] = 'links/index/$1';
  </code></pre>