EE 1
EE 2
PathFinder
Developer
3rd Party (Commercial)
Buy Now!
Compatibility
- LG Addon Updater
- Multi Site Manager
- Stand Alone Entry Form
Requirements
- jQuery for the Control Panel
Tags
- redirect, http redirect, 301 redirect, http 301, redirect url, url redirect, entry redirect, redirect entry url, entry url redirect, change url, change slug, change url_title, change url slug, change entry url, change entry slug, change entry url_title, change entry url slug, redirect slug, redirect url_title, redirect url slug, redirect entry slug, redirect entry url_title, redirect entry url slug
Configure ExpressionEngine to automatically perform an HTTP 301 redirect when the URL slug (url_title) for an entry is changed.
Want to allow content editors to change URL slugs for SEO purposes or to match changes in entry titles, without losing existing search engine ranking as a result of changing the URL, and without needing a developer to setup a redirect? This add-on can help.
Requires initial setup by someone competent with PHP.
Quick Start
- Edit the get_uri_template.php script to implement the logic you want (see example below). When an entry is updated and that script returns a non-empty string, a new URI will be generated using the string as a pattern. If the new URI doesn’t match the previous URI, a new mapping will be created and the old URI will automatically be redirected.
- Install the extension: copy the contents of the ‘extensions’ directory to the EE ‘extensions’ directory.
- Activate the extension.
Requirements
PHP 5.2.4+. This has been tested on EE 1.5.2 and 1.6.7. Based on the hooks used, it sounds like it should work in EE 1.4.2+, but I don’t know for sure. This has been developed with *nix environments in mind—I don’t know or care if it would work under Windows.
Sample get_uri_template.php
This is the part that requires setup by someone competent with PHP. You can implement whatever logic you like using the data and resources available (more info in the docs). Here’s a straightforward example, which basically sees if there’s an ‘entry’ template configured for the section (“weblog”) that the entry being updated belongs to:
$templates = array(
12345 => array(
'entry' => '/TEMPLATE-GROUP/TEMPLATE/{$url_title}/'
)
// array
,
55555 => array(
'entry' => '/TEMPLATE-GROUP/{$entry_id}/{$url_title}/'
)
// array
);
// array
if ( ! (
$entity_type[ 'keyword_id' ] == 'entry' &&
isset( $templates[ $entity[ 'weblog_id' ] ][ 'entry' ] ) &&
( $template = $templates[ $entity[ 'weblog_id' ] ][ 'entry' ] )
) ) {
$template = NULL;
}
// if
return $template;
PathFinder Links
Hooks Used
If the add-on is an extension, and ties into ExpressionEngine's core files, it will use ExpressionEngine hooks. We are listing any hooks the add-on uses for developers to have an easier time locating other add-ons that they can reference for their own work.
This entry was last updated December 16, 2011, 4:27 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!