/**
* Gets the current URL, including the BASE_URL
*
* @param string the url
*/
public static function main()
{
return static::create(\Request::main()->uri->uri);
}
/**
* Gets the current URL, including the BASE_URL
*
* @param string the url
*/
public static function current()
{
return static::create();
}
Uri::main() should return ONLY main URL.
Example, if my website is on http://fuel.com/, Uri::main() should return only "http://fuel.com/", but it's returning the same thing as Uri::current(), which is the base URL plus controller.
Uri::main in welcome/index is currently returning:
Entered by Juan Treminio on 4/13/11
fuel/core/classes/uri.php:
Uri::main() should return ONLY main URL.
Example, if my website is on http://fuel.com/, Uri::main() should return only "http://fuel.com/", but it's returning the same thing as Uri::current(), which is the base URL plus controller.
Uri::main in welcome/index is currently returning:
http://fuel.com/welcome/index/
For now I've simply extend Uri:
Stuart Hutchinson responded
According to the docs, URI:current() does the following:
whereas URI::main() does the following:
I think this should probably be a feature if adding a function such as URI::base() to the class is desired.