301 Moved Permanently
Enables website administrators to configure 301 Moved Permanently redirects for old content pages/urls. This is achieved using a custom 404 handler.
This functionality requires a new property (with the alias of "umbraco301MovedPermanently
") to be added to your document-type.
This will work in a similar method to the "umbracoUrlAlias
" property alias. If a content node can not be found from the NiceUrl, then the NotFoundHandlers are
actioned; until alternative content is found, otherwise a 404 error.
If a umbraco301MovedPermanently
value is found, then the user is redirected to the new content page/url along with the 301 HTTP status code.
To manually enable this functionality, add the following setting as the first of the "NotFoundHandlers" section in /config/404handlers.config:
<notFound assembly="uComponents.Core" type="NotFoundHandlers.SearchFor301MovedPermanently" />
It is important that it does not appear after the "handle404" entry, as it will not work as intended.
Remember to keep the value in lower-case, and exclude the leading slash and trailing ".aspx" from the umbraco301MovedPermanently property value.
The "301 Moved Permanently" NotFoundHandler is an update to the original package, which can still be found on the Our Umbraco community website:
This update enables compatibility with Umbraco 4.5+.