File Conversion   Join Us   Links   Search   Sitemap
 
Joomla 2.5: How to remove ID from URL
User Rating: / 5
PoorBest 
Articles - SEO
Written by 101wsites   
Monday, 04 June 2012 02:39

Open components\com_content\router.php in an editor.

Replace line 27 (in function ContentBuildRoute(&$query)):
$advanced    = $params->get('sef_advanced_link', 0); 
with
$advanced    = $params->get('sef_advanced_link', 1);

Replace line 208 (in function ContentParseRoute($segments)):
$advanced    = $params->get('sef_advanced_link', 0);
with
$advanced    = $params->get('sef_advanced_link', 1);

Comment out lines 228-232:
if (strpos($segments[0], ':') === false) {
    $vars['view'] = 'article';
    $vars['id'] = (int)$segments[0];
    return $vars;
}
so it would be
/*
if (strpos($segments[0], ':') === false) {
    $vars['view'] = 'article';
    $vars['id'] = (int)$segments[0];
    return $vars;
}*/

Works in Joomla 2.5.4

Last Updated on Monday, 04 June 2012 03:33
 
Copyright © 2016 101wsites.com, email: contact[at]101wsites.com
Partners: 101bookmarks.com