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.