$url = JUri::getInstance("https://example.com/about/team"); $path = $url->getPath(); echo $path; // Output: /about/team
$url = JUri::getInstance("http://localhost:8000/index.php?option=com_content&view=article&id=1"); $path = $url->getPath(); echo $path; // Output: /index.phpThe JURI getPath method is part of the Joomla CMS package/library. It is used in Joomla to extract the path component of the current URL, which is then used by the CMS to load the appropriate page or component.