Описание модуля
Полное название: Global Redirect
Проект начат: October 7, 2006
Описание с сайта
Что?
GlobalRedirect - простой модуль, который…
- Проверяе текущий URL на наличие синонимов и делает 301-й редирект на синоним, если он не был использован.
- Проверяет текущий URL на завершающий слеш, удаляет его, если он есть и повторяет проверку 1 с новым запросом.
- Проверяет, текущий URL на совпадение с site_frontpage и делает переадресацию
на главную страницу в случае совпадения. - Checks if the Clean URLs feature is enabled and then checks the current URL is being accessed using the clean method rather than the 'unclean' method. (Currently only in DEV, will be in 1.3 soon)
Зачем?
Once enabled, an alias provides a nice clean URL for a path on a site. However Drupal does not remove the old path (eg node/1234). The problem is that you now have two URLs representing the same content. This is dangerous territory for duplicate pages which can get you sandboxed by the search engines!
How?
This module uses hook_init to interrupt the page load and the a alias lookups. If any of the above rules apply then the appropriate action is taken. If no rules apply then the page load continues uninterrupted. An example of this in use is on the site it was developed for. http://www.sportbusiness.com/node/160559 will redirect to http://www.sportbusiness.com/news/160559/lagardere-sets-up-sports-division due to the alias setup on this site.
Всё, что мне нужно знать
As with most modules - there are often a few things you should be aware of before going ahead.
Version 1.2 has been released. This includes some code improvements and better compliance with coding standards.
Known Bugs:
Broken under 4.7.4, but works under later 4.7 releases. The issue is explained on node 89600, comment 13 and is caused by path.inc not returning aliases correctly. Thanks to RayZ for finding the problem
Issues with Windows IIS Server. There is a known issue with Clean URL's in IIS and there is also a known issue with certain versions of PHP running on IIS where a Permanent Redirect (301) is incorrectly sent as Object Moved (302).










