The module settings at admin/settings/filters/(filter)/configure

Allows administrators to replace the base URL in <img> and <a> elements.

Users tend to create links and images in their content with absolute URLs. This can be a problem if the site moves to another domain (perhaps between development and production sites) or is behind a proxy, with a different address for authenticated users.

Some replacement examples:

Before: Some link
After: Some link

Before: Image removed.
After: Some image

You can setup such replacements in the URL Replace Filter settings as follow:

Original: http://example.com:8080/
Replacement: %baseurl/

Original: http://dev.example.com/
Replacement: %baseurl/

%baseurl is a token for your site's base URL. The above examples assume a site located in the domain's root directory (in which case %baseurl is actually empty).

Drupal versions

The module is available for Drupal 10, 9, 8, 6, 5, and 4.7. In most cases, Drupal 7 has better alternatives.

See also

Short name
url_replace_filter
Supporting organizations
Code