SEF url to normal url in Joomla

402 Views Asked by At

In Joomla, suppose we have sef url like:

http://www.mauriestate.com/en/mauritius-real-estate-community/groups/viewgroup/1-social-media-in-action.html

Now I have to append a variable "id" to this url, so i have done this:

$invite_url="http://www.mauriestate.com/en/mauritius-real-estate-community/groups/viewgroup/1-social-media-in-action.html"
$inv_url=$invite_url."&id="."123"

Now when i open $inv_url in browser, I am getting a 404 error. Can you give me any idea how to append a variable to sef urls in php, or can you tell me the way to generate a normal url from a sef url.

1

There are 1 best solutions below

1
On

Replace & with ?:

$inv_url=$invite_url."?id="."123"