zem_redirect

zem_redirect is a 301 redirect and 404 not found handler for Textpattern articles. It redirects browsers and search engine spiders to the correct article URL after a title or section change, and displays a 404 response for articles that don’t exist.

Textpattern articles are currently reachable via several different URL paths. For example:

http://example.com/article/5/
http://example.com/article/5/article-title
http://example.com/article/5/old-article-title-before-i-renamed-it-to-something-shorter

External factors can multiply these (e.g. www.example.com vs. example.com).

This can cause problems with search engines and link aggregators, since they don’t have any way of knowing that all of these URLs represent the same page (as opposed to multiple pages with identical content).

<txp:zem_redirect /> is designed to help reduce the problem. It checks the URL used to fetch each article; if it doesn’t match the correct URL for the article (including the article-title and full hostname as specified in the Textpattern config), the plugin will return a 301 Moved Permanently response to direct the user’s browser to the correct URL. It also works as a 404 handler for articles that don’t exist or are not visible.

Download the current version: zem_redirect-0.5.txt
Online docs: zem_redirect documentation


The documentation refers to version 0.6, but the latest available for download is 0.5. Is there a new version of this great plugin available somewhere?

Andrew Kember    May 6, 08:50 pm    #

Commenting is closed for this article.