简体   繁体   中英

Remove Article ID from Joomla 3 url

I am trying to remove article id from Joomla 3 URL. I searched around and the response is in

components\\com_content\\router.php

change 0 to 1 in $advanced = $params->get('sef_advanced_link', 1);

on lines 38 and 290

and also comment out

if (strpos($segments[0], ':') === false) { $vars['view'] = 'article'; $vars['id'] = (int)$segments[0]; return $vars; }

I consider it works fine in Joomla 2.5 as all comments mention this.

But it does not do the job for me on my Joomla 3.3 website.

How can I achieve this without creating menu items for each article?

Instead of doing it in the filesystem and modify the Joomla core, you can do this by modifying the com_content row in the extensions table as described here: http://www.itoctopus.com/how-to-remove-the-article-id-from-joomlas-sef-urls (the 2 methods are described in that URL, the filesystem method and the database method)

Note that this is tested on Joomla 3.x and it should work. If it doesn't work for you then most likely you will need to clear your Joomla cache.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM