How to get the full URL of a Drupal page?
Asked 07 September, 2021
Viewed 1.2K times
  • 50
Votes

I need to be grabbing the URL of the current page in a Drupal site. It doesn't matter what content type it is - can be any type of node.

I am NOT looking for the path to theme, or the base url, or Drupal's get_destination. I'm looking for a function or variable that will give me the following in full:

http://example.com/node/number

Either with or without (more likely) the http://.

9 Answer