When writing a plugin is there a Craft request to grab the entire url? I want to grab everything including http://domain.com/uri preferably without writing my own function.

I see getUrl but craft()->request->url only returns 'uri' of http://domain.com/uri.

1 Answer 1


You're probably looking for something like:


Which will return the host name with the schema it's using (http:// or https://) as well as any URI after the host including any querystring parameters.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.