README.txt 1.8 KB

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