How convert SEF joomla link to a regular link

  • (1 Vote)
  • Written by 
  • Thursday, 28 April 2023 19:29

<?php
// SEF-link
$url = 'http://www.site.com/index.php/using-joomla/parameters';
$uri = JURI::getInstance($url);
$app = & JFactory::getApplication('site');
$router = & $app->getRouter();
$vars = $router->parse($uri);
$parts = array();
foreach($vars as $k => $v) {
    $parts[] = $k . '=' . $v;
}
// non SEF link
$nonSefUrl = JURI::base() . 'index.php?' . implode('&', $parts);
?>

 

845 Read

Leave a comment

Make sure you enter all the required information, indicated by an asterisk (*). HTML code is not allowed.