The idea of "externality" to a Drupal site is rather muddled currently. A Drupal site installed at will treat the url "" as "external" when checked with url_is_external(). The function _external_url_is_local() comes from here #736172: drupal_goto() should allow absolute destinations that are within the same site and appears in the documentation for Drupal 8

Really, how can something "external" ever be "local", semantically speaking?

Currently "local" means "is this Drupal site" and "internal" means "relative path recognisable by the menu system", "external" means "absolute path" and there is no opposite of local, just "not local".

I think the easiest way to make sense of it all is just to call "external" "absolute" instead as that still clearly differentiates from the alternative which is "relative Drupal path" but doesn't allow the user to get it confused with something else.


thedavidmeister’s picture

or, maybe even uri_is_absolute() since "<front>" is not a url... or even is_absolute_url() would make more sense. url_is_X() strongly implies that the parameter only accepts a valid url.

Version: 8.0.x-dev » 8.1.x-dev

Drupal 8.0.6 was released on April 6 and is the final bugfix release for the Drupal 8.0.x series. Drupal 8.0.x will not receive any further development aside from security fixes. Drupal 8.1.0-rc1 is now available and sites should prepare to update to 8.1.0.

Bug reports should be targeted against the 8.1.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.