You are here

README.txt in Field Redirection 7.2

Same filename and directory in other branches
  1. 8.2 README.txt
  2. 7 README.txt
Field Redirection
*****************

A field formatter for EntityReference, File, Image, Link, Node Reference, Term
Reference, URL and User Reference fields that will perform a HTTP redirect to
the given entity, file, URL, term, node, URL or user.  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

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.

TODO
****
There are a few tasks that would be good to add:
* Provide JavaScript redirection, like the old CCK_Redirection module.
* Provide frameset redirection, like the old CCK_Redirection module.
* Backport to Drupal 6 (seriously).

Attribution
***********
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].

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.

Author
******
The module was written and is maintained by DamienMcKenna [5]. Development is
currently sponsored by Mediacurrent [6].


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: http://www.mediacurrent.com/

File

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