You are here

README.txt in Field Redirection 8.2

Same filename and directory in other branches
  1. 7.2 README.txt
  2. 7 README.txt
Field Redirection
-----------------
A field formatter for Link fields that will perform a HTTP redirect to
the given URL. The formatter's settings allow selection from one of the
seven different possible HTTP status codes that are allowed by the
specifications.


Example Usage
--------------------------------------------------------------------------------
The best way of using this module is to create a custom display setting for the
"Full content", pick one of the redirect status codes below, e.g. 301, and hide
all other fields to reduce processing & load time.

To configure the recommended settings:
* Go to the "Manage Display" tab on the settings page for the entity of choice
  (user, content type, etc) settings page, e.g. to work with the content type
  "redirect_user", go to the URL:
  http://example.com/admin/structure/types/manage/redirect_user/display
  (where "example.com" is your site's hostname).
* Expand the "Custom display settings" fieldset and ensure the "Full content"
  checkbox is checked.
* Click the "Save" button.
* Go to the "Full Content" tab.
* Optional: Administrators will be able to still view the page without it
  redirecting, so customize other fields as desired.
* Click the selector in the Format column of the desired field, and change it
  to the "Redirect" formatter.
* By default the formatter will do a HTTP 301 redirect, indicating the path in
  question is permanently moved.  To change this, click the "cog" icon beside
  the field and select one of the other options, then click Update.
* Click the "Save" button.
* Ensure that other display modes do not use the redirect.


Status codes
--------------------------------------------------------------------------------
For completeness sake this module provides all of the allowed HTTP status codes
that are valid for redirection:
* 300 - "multiple choices".
* 301 - "moved permanently" - The best option for most use cases, indicates
  that the current path will not be made available again and links should be
  updated to the new path.
* 302 - "found" - Usually used to indicate a temporary redirect, but also that
  there may be technical problems causing the redirection.
* 303 - "see other".
* 304 - "not modified".
* 305 - "use proxy".
* 307 - "temporary redirect" - Best to use if the path is purposefully only
  being redirected temporarily and this current path will be made available
  for display again at a later time.  If the current path will not be made
  available again it would be better to use status code 301 instead.

The most commonly used are 301 and 307.

Further reading: http://en.wikipedia.org/wiki/URL_redirection


Why a separate module?
--------------------------------------------------------------------------------
This was written as a separate module rather than an expansion of the D7 port
of CCK_Redirection purely to keep it small & simple, without adding any extra
fields or deal with migration of D6 data.


WARNING
--------------------------------------------------------------------------------
This field formatter should *only* be used when displaying the "full content"
of a given entity (user, content type, etc), otherwise unexpected results will
happen. A warning message will be displayed if the formatter is selected for
use on the Default, Teaser, RSS, Search Index, Search Result, Revision or Token
view modes. Example problems that can arise include:
* Using this formatter for a view mode used on the search index could cause
  the search index to never complete, or even cron to never complete.
* Using this formatter in an RSS feed would cause all readers of the RSS feed
  to be instantly redirected to the path provided by this field, rather than
  seeing the feed itself.
* Using this formatter in a teaser would cause any page that displayed this
  entity in its content list, e.g. possibly the site's homepage, to redirect.


Limitations
--------------------------------------------------------------------------------
There are a few known limitations to this module:
* If multiple fields on the same entity/bundle have the Redirect formatter
  selected, the first one to be processed will be the one that controls the
  redirect.
* If a field has multiple values, only the first item will be used for the
  redirect.
* The redirect action will not be triggered when the site is in maintenance
  mode.


Credits / contact
--------------------------------------------------------------------------------
Based on the CCK_Redirection [1] module by Robin Monks [2] for Drupal 5 and 6.
The idea of just providing formatters rather than a fully separate field type
was from user e2thex [3] who suggested the idea during discussion of the
Drupal 7 port of CCK_Redirection [4].

The module was written by Damien McKenna [5]. Currently maintained by Damien
McKenna, Lee Rowlands [6] and Michael Anello [7]. Development is
currently sponsored by Mediacurrent [8], PreviousNext [9] and DrupalEasy [10].

The best way to contact the authors is to submit an issue, be it a support
request, a feature request or a bug report, in the project issue queue:
  https://www.drupal.org/project/issues/field_redirection


References
--------------------------------------------------------------------------------
1: http://drupal.org/project/cck_redirection
2: http://drupal.org/user/12246
3: http://drupal.org/user/189123
4: http://drupal.org/node/1098250
5: http://drupal.org/user/108450
6: https://www.drupal.org/u/larowlan
7: https://www.drupal.org/u/ultimike
8: http://www.mediacurrent.com/
9: http://www.previousnext.com.au
10: https://www.drupaleasy.com

File

README.txt
View source
  1. Field Redirection
  2. -----------------
  3. A field formatter for Link fields that will perform a HTTP redirect to
  4. the given URL. The formatter's settings allow selection from one of the
  5. seven different possible HTTP status codes that are allowed by the
  6. specifications.
  7. Example Usage
  8. --------------------------------------------------------------------------------
  9. The best way of using this module is to create a custom display setting for the
  10. "Full content", pick one of the redirect status codes below, e.g. 301, and hide
  11. all other fields to reduce processing & load time.
  12. To configure the recommended settings:
  13. * Go to the "Manage Display" tab on the settings page for the entity of choice
  14. (user, content type, etc) settings page, e.g. to work with the content type
  15. "redirect_user", go to the URL:
  16. http://example.com/admin/structure/types/manage/redirect_user/display
  17. (where "example.com" is your site's hostname).
  18. * Expand the "Custom display settings" fieldset and ensure the "Full content"
  19. checkbox is checked.
  20. * Click the "Save" button.
  21. * Go to the "Full Content" tab.
  22. * Optional: Administrators will be able to still view the page without it
  23. redirecting, so customize other fields as desired.
  24. * Click the selector in the Format column of the desired field, and change it
  25. to the "Redirect" formatter.
  26. * By default the formatter will do a HTTP 301 redirect, indicating the path in
  27. question is permanently moved. To change this, click the "cog" icon beside
  28. the field and select one of the other options, then click Update.
  29. * Click the "Save" button.
  30. * Ensure that other display modes do not use the redirect.
  31. Status codes
  32. --------------------------------------------------------------------------------
  33. For completeness sake this module provides all of the allowed HTTP status codes
  34. that are valid for redirection:
  35. * 300 - "multiple choices".
  36. * 301 - "moved permanently" - The best option for most use cases, indicates
  37. that the current path will not be made available again and links should be
  38. updated to the new path.
  39. * 302 - "found" - Usually used to indicate a temporary redirect, but also that
  40. there may be technical problems causing the redirection.
  41. * 303 - "see other".
  42. * 304 - "not modified".
  43. * 305 - "use proxy".
  44. * 307 - "temporary redirect" - Best to use if the path is purposefully only
  45. being redirected temporarily and this current path will be made available
  46. for display again at a later time. If the current path will not be made
  47. available again it would be better to use status code 301 instead.
  48. The most commonly used are 301 and 307.
  49. Further reading: http://en.wikipedia.org/wiki/URL_redirection
  50. Why a separate module?
  51. --------------------------------------------------------------------------------
  52. This was written as a separate module rather than an expansion of the D7 port
  53. of CCK_Redirection purely to keep it small & simple, without adding any extra
  54. fields or deal with migration of D6 data.
  55. WARNING
  56. --------------------------------------------------------------------------------
  57. This field formatter should *only* be used when displaying the "full content"
  58. of a given entity (user, content type, etc), otherwise unexpected results will
  59. happen. A warning message will be displayed if the formatter is selected for
  60. use on the Default, Teaser, RSS, Search Index, Search Result, Revision or Token
  61. view modes. Example problems that can arise include:
  62. * Using this formatter for a view mode used on the search index could cause
  63. the search index to never complete, or even cron to never complete.
  64. * Using this formatter in an RSS feed would cause all readers of the RSS feed
  65. to be instantly redirected to the path provided by this field, rather than
  66. seeing the feed itself.
  67. * Using this formatter in a teaser would cause any page that displayed this
  68. entity in its content list, e.g. possibly the site's homepage, to redirect.
  69. Limitations
  70. --------------------------------------------------------------------------------
  71. There are a few known limitations to this module:
  72. * If multiple fields on the same entity/bundle have the Redirect formatter
  73. selected, the first one to be processed will be the one that controls the
  74. redirect.
  75. * If a field has multiple values, only the first item will be used for the
  76. redirect.
  77. * The redirect action will not be triggered when the site is in maintenance
  78. mode.
  79. Credits / contact
  80. --------------------------------------------------------------------------------
  81. Based on the CCK_Redirection [1] module by Robin Monks [2] for Drupal 5 and 6.
  82. The idea of just providing formatters rather than a fully separate field type
  83. was from user e2thex [3] who suggested the idea during discussion of the
  84. Drupal 7 port of CCK_Redirection [4].
  85. The module was written by Damien McKenna [5]. Currently maintained by Damien
  86. McKenna, Lee Rowlands [6] and Michael Anello [7]. Development is
  87. currently sponsored by Mediacurrent [8], PreviousNext [9] and DrupalEasy [10].
  88. The best way to contact the authors is to submit an issue, be it a support
  89. request, a feature request or a bug report, in the project issue queue:
  90. https://www.drupal.org/project/issues/field_redirection
  91. References
  92. --------------------------------------------------------------------------------
  93. 1: http://drupal.org/project/cck_redirection
  94. 2: http://drupal.org/user/12246
  95. 3: http://drupal.org/user/189123
  96. 4: http://drupal.org/node/1098250
  97. 5: http://drupal.org/user/108450
  98. 6: https://www.drupal.org/u/larowlan
  99. 7: https://www.drupal.org/u/ultimike
  100. 8: http://www.mediacurrent.com/
  101. 9: http://www.previousnext.com.au
  102. 10: https://www.drupaleasy.com