Pages

Change suffix from html to htm in Joomla

Goto includes/router.php
Line 57 : Replace the current code there with ,


if($suffix = pathinfo($path, PATHINFO_EXTENSION))
{
$path = str_replace('.'.$suffix, '', $path);
$vars['format'] = $suffix;
if ($suffix == 'htm')
{
$path = str_replace('.'.$suffix, '', $path); //pair of single quotes inserted
$vars['format'] = 'html';
} else {
$path = str_replace('.'.$suffix, '', $path); //pair of single quotes inserted
$vars['format'] = $suffix;
}
}




Then goto line 101 : Replace the current code there with ,



if($format = $uri->getVar('format', 'html'))
{
$route .= '.htm';
$uri->delVar('format');
}




If you need the suffix to change from .html to .php , then just replace the .htm in the above code by .php and thats it..

if you are still not able to do it, then just download this ,
router.php file and upload it to includes folder.

3 comments:

  1. This comment has been removed by the author.

    ReplyDelete
  2. http://www.4shared.com/file/uAK-13HW/module.html

    ReplyDelete
  3. would be awesome but it doesnt work.

    results in a Parse error: syntax error, unexpected $end, expecting T_FUNCTION in /includes/router.php on line 443

    ReplyDelete