title: Get rid of ID (category and article) from URL (Joomla 3.3 / 3.4 / 3.5)
body: <p>I have a <code>Joomla 3.3.6</code> (edited: <code>3.5.</code>) site organized in only 3 levels: </p>
  
  <ul>
  <li>Four big categories (i, ii, iii, iiii)</li>
  <li>Each one divided in some intermediate categories (A, B, C, ...)</li>
  <li>And finally articles</li>
  <li>Two languages (en, pt)</li>
  </ul>
  
  <p>The <code>URL</code> after setting <code>Search Engine Friendly URLs</code>, <code>Use URL rewriting</code>, <code>Adds Suffix to URL</code> and <code>multilanguage support</code>, <strong>should</strong> be in the form:</p>
  
  <p><code>http://www.example.com/en/bigcatiii/intercatA/articlex.html</code></p>
  
  <p>But as many others that have Joomla installed and ask for a solution since Joomla-Baby-Version, I got:</p>
  
  <p><code>http://www.example.com/en/bigcatiii/666-intercatA/articlex.html</code></p>
  
  <p>where 666 is a number from hell indicating for no purpose a <strong>category ID</strong></p>
  
  <p>Now browsing for an answer, I found this answer:</p>
  
  <pre><code> Edit “components/com_content/router.php“
   (You’ll probably have to re-do this step every time you update Joomla.)
   Replace the lines 38 and 290 with:
   $advanced = $params-&gt;get('sef_advanced_link', 1);
  
   and Replace line 426 with
   -&gt;where($db-&gt;quoteName(‘alias’) . ‘ = ‘ . $db-&gt;quote($segment)); 
  </code></pre>
  
  <p>Well, first of all, line 426 is already like that in the original. Second, this does not do the trick. It do works with:</p>
  
  <p><code>http://www.example.com/en/bigcatiii/intercatA/articlex.html</code></p>
  
  <p>But it breaks wit a <strong>404</strong> error if you browse to:</p>
  
  <p><code>http://www.example.com/en/bigcatiii/intercatA.html</code></p>
  
  <p>Also, I noticed that the <strong>ID</strong> numbers are different. While the whole URL is</p>
  
  <p><code>http://www.example.com/en/bigcatiii/666-intercatA/articlex.html</code></p>
  
  <p>The same category description page is</p>
  
  <p><code>http://www.example.com/en/bigcatiii/333-intercatA.html</code></p>
  
  <p>There is also another solution that sound better, but also do not work, based on <strong>.htaccess</strong></p>
  
  <pre><code>RewriteEngine on
  RewriteBase /
  RewriteRule (\d+)-([^/]*) $2 [R=301,L]
  </code></pre>
  
  <p>The <code>URLs</code> appear ok, but the pages are not found. It would be so much better if we can provide a solution using <strong>.htaccess</strong> instead of changing Joomla core.</p>
  
  <p>Still, changing the Joomla core would just fine, if this other googled suggestion was valid.</p>
  
  <pre><code> Copy “components/com_content/router.php” to “/templates/your-template/html”
  </code></pre>
  
  <p>Meaning that once you moved <code>router.php</code> to your "local", you wouldn't need to redo all the stuff after an upgrade. (Unless, of course, router.php is updated, in case you would better mirror it again.)</p>
  
  <p>Thanks for your time to solve this puzzle!</p>
  
  <p><strong>References</strong></p>
  
  <p><a href="http://forum.joomla.org/viewtopic.php?t=398429" rel="nofollow noreferrer" title="Joomla Forum ">1- Change/ Remove Article ID in URL?</a></p>
  
  <p><a href="http://www.hyde-design.co.uk/joomla-training/joomla-bites/146-removing-the-id-number-from-joomla-25-articles" rel="nofollow noreferrer" title="Hide Design">2- Removing the Article ID number</a></p>
  
  <p><a href="http://forum.joomla.org/viewtopic.php?f=618&amp;t=729782&amp;sid=04c322dc680e3774abf4a47d8643b9cd&amp;start=30" rel="nofollow noreferrer" title="Joomla Forum">3- How to remove article id in url?</a></p>
  
  <p><a href="http://forum.joomla.org/viewtopic.php?t=826165" rel="nofollow noreferrer" title="Joomla Forum">4- Remove article id from url for joomla 3.0</a></p>
  
  <p><a href="http://docs.joomla.org/Enabling_Search_Engine_Friendly_%28SEF%29_URLs" rel="nofollow noreferrer" title="Docs Joomla">5- Enabling SEF</a></p>
  
  <p><a href="https://joomla.stackexchange.com/questions/988/remove-article-id-from-joomla-3-url" title="Joomla StackExchange">6- Remove article id from joomla 3 URL</a></p>
  
  <p><a href="https://stackoverflow.com/questions/23809575/remove-article-id-from-joomla-3-url" title="StackOverflow">7- Remove article id from joomla 3 URL</a></p>
  
  <p><a href="https://stackoverflow.com/questions/19877131/htaccess-redirect-rule-for-for-removing-article-id" title="StackOverflow">8- .htaccess redirect rule</a></p>
  
  <p><a href="http://htaccess.madewithlove.be/" rel="nofollow noreferrer" title="Made With Love">9- Test .htaccess</a></p>
  
  <hr>
  
  <p>Edited (2016/May/02): NEW Bounty for Joomla last version 3.5</p>