EE2 Ready Add-ons »

Plugin

EE 1
EE 2
Redirect301

Developer

Nick Cernis

3rd Party (Free)


Compatibility

Requirements

  • jQuery for the Control Panel
  • Hermes

Redirect301 is a MSM compatible plugin that redirects internal links by sending an SEO-friendly 301 header. This tells search engines that your content has moved permanently and avoids penalties for duplicate content.

You can issue a 301 redirect to a new page like this:

{exp:redirect301 url="weblog/template"}

If you’re using the Multiple Site Manager, simply specify the name or ID of your site, like this:

{exp:redirect301 url="weblog/template" site="site_short_name_or_id"}

If you’re using MSM and you don’t specify the site, redirect301 uses the default_site URL to build redirect links.

Use case: short URL system

There are probably several uses for internal 301 redirects, but I’m using it as short URL generator, like this:

  1. Create a template group called “go”
  2. Edit the index file to include the following code:
{exp:weblog:entries limit="1" entry_id="{segment_2}" disable="member_data|trackbacks|pagination"}
{exp:redirect301 url="{weblog}/{url_title}"}
{/exp:weblog:entries}

This will take a URL such as http://yoursite.com/go/33/ and issue a 301 redirect to the full URL, such as http://yoursite.com/compliments/you-look-nice-today/

Then, to create a link within your posts that readers can share, simply append the post ID to the short URL address, like this:

{exp:weblog:entries} 
<a href="{site_url}go/{entry_id}">Short URL</a>
{/exp:weblog:entries}

Redirect301 Links

This entry was last updated November 30, 2009, 12:52 am.

Disclaimer: Information about ExpressionEngine add-ons is provided as a service to you, the user, and every member of the ExpressionEngine community. Devot:ee is not responsible if you hose, mangle, wreck, or otherwise destroy your EE website by installing an add-on that you found out about at this site, regardless of its rating, Favorites status, commercial or free status, or general popularity. Caveat EEmptor!

There are no reviews for this add-on yet.

What are you waiting for? Rate it and review it!