theitd icon

Get URL from Joomla SEF

theitd | PRO | 10/20/14 11:17:14 PM UTC | 0 ⭐ | 711 👁️ | Never ⏰ | []
PHP |

390 B

|

None

|

0 👍

/

0 👎

<?php
// "unparse" the Joomla SEF url to get the internal joomla URL
    JURI::current();// It's very strange, but without this line at least Joomla 3 fails to fulfill the task
    $router =& JSite::getRouter();// get router
    $query = $router->parse(JURI::getInstance()); // Get the real joomla query as an array - parse current joomla link
    $url = 'index.php?'.JURI::getInstance()->buildQuery($query);
?>

Comments