Hi,
This may sound like a silly request... but here goes. I want to get the current URL from the address bar. The right side of the URL to be more precise. This is done by $_SERVER['REQUEST_URI']. However I need to "get" the url in a PHP file, but the URL that I get when I get it in that php file is wrong. So I want to get the url in the php file using a different php file so I can get the correct url.
I'm trying to do this in a Joomla website that uses JoomSEF.
The URL I'm trying to get is a search engine friendly URL, however I'm getting something like: /index.php?option=com_jcomments&tmpl=component. So I want to get the current url from a different PHP file, a PHP file that does has the correct SEF URL.
Does anyone have any idea if and how this can be done?
This may sound like a silly request... but here goes. I want to get the current URL from the address bar. The right side of the URL to be more precise. This is done by $_SERVER['REQUEST_URI']. However I need to "get" the url in a PHP file, but the URL that I get when I get it in that php file is wrong. So I want to get the url in the php file using a different php file so I can get the correct url.
I'm trying to do this in a Joomla website that uses JoomSEF.
The URL I'm trying to get is a search engine friendly URL, however I'm getting something like: /index.php?option=com_jcomments&tmpl=component. So I want to get the current url from a different PHP file, a PHP file that does has the correct SEF URL.
Does anyone have any idea if and how this can be done?