README.txt 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. README file for the URL Replace Filter Drupal module.
  2. Description
  3. ***********
  4. The URL Replace Filter module allows administrators to replace the base URL in
  5. <img> and <a> elements.
  6. Users tend to create links and images in their content with absolute URLs. This
  7. can be a problem if the site moves to another domain (perhaps between
  8. development and production sites) or is behind a proxy, with a different address
  9. for authenticated users.
  10. Some replacement examples:
  11. Before: <a href="http://example.com:8080/somepath">Some link</a>
  12. After: <a href="/somepath">Some link</a>
  13. Before: <img src="http://dev.example.com/files/image.jpg" alt="Some image" />
  14. After: <img src="/files/image.jpg" alt="Some image" />
  15. You can setup such replacements in the URL Replace Filter settings as follow:
  16. Original: http://example.com:8080/
  17. Replacement: %baseurl/
  18. Original: http://dev.example.com/
  19. Replacement: %baseurl/
  20. %baseurl is a token for your site's base URL. The above examples assume a site
  21. %located in the domain's root directory (in which case %baseurl is actually
  22. %empty).
  23. Like any Drupal filter, the original user-entered content is not altered. The
  24. filter is only applied (and its result cached) when the node is viewed.
  25. Installation
  26. ************
  27. 1. Extract the 'url_replace_filter' module directory into your site's modules
  28. directory.
  29. 2. Go to the Administer > Site configuration > Input formats page, and click
  30. configure next to the input format that shall replace URLs.
  31. 3. Enable the URL Replace Filter in the input format's configuration page, and
  32. save the configuration.
  33. 4. Click the Configure tab. In the URL Replace Filter box, enter original and
  34. replacement URLs in the appropriate fields and save the configuration. More
  35. empty replacement fields will automatically be added after saving, in case
  36. you need more fields than provided by default.