You want to run the URL through JRoute to get the full URL. You also need to know how Joomla articles are usually created.
$url = JRoute::_('index.php?option=com_content&view=article&id='.$id);
This assumes you have id in the variable $id . For the rest of the URL, you will need to find out the component that you are calling (added as an option, as mentioned above, the Content manager is always com_content ) and the view (which is for the article article ). You can view the various views available for com_content by checking the file structure in /components/com_content/views/ . In addition to article , you should see articles , categories and category , as well as several others.
source share