0

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.

JJJ
  • 32,902
  • 20
  • 89
  • 102
vvktekdi
  • 1
  • 1

1 Answers1

2

Replace & with ?:

$inv_url=$invite_url."?id="."123"
chown
  • 51,908
  • 16
  • 134
  • 170
Mike
  • 5,416
  • 4
  • 40
  • 73
  • This is correct - you use `&` to separate GET parameters. You use `?` at the start of the GET parameters to indicate the end of the request path. – KingJackaL Oct 21 '11 at 02:02