I'm using some php code to get the current active url and the current active uri. I need this to dynamicaly insert a canonical tag. It works great, but I've noticed that when I'm using your extension and access for example /en/ or /ru) it doesn't give me the right url's back. It returns the real url, but not the URL of the translation.
url shown in browser: http://www.domain.com/en/content?param1=1
return url: http://www.domain.com/content (and: http://www.domain.com/content?param1=1)
which is wrong and should return: http://www.domain.com/en/content (and http://www.domain.com/en/content?param1=1)
I use the following code:
- Code: Select all
// Get SEO Page URL
$pageUrl = JURI::current();
// Get URI Object
$uri = & JFactory::getURI();
// Get URI String
$pageUri = $uri->toString();
I can deal with this myself, but can you please tell me how to get the real (SEO) url including your language "subdirectory" (by php - in this two variants)? Would be really important for me.