Redirecting Community Server Links to Graffiti

If you've migrated from Community Server to Graffiti then you might have noticed that the URL structure is different. This Graffiti plug-in performs a 301 redirect on the links so bookmarks and search engine results will continue to work.

The plug-in redirects both posts (/archive/2007/11/14/test-post.aspx) and tags (/archive/tags/test+tag/default.aspx) provided they exist in Graffiti. It also doesn't matter if your CS site was running in single blog mode or in the default multi blog mode. It will still match the pattern and redirect if a post/tag is found.

To use the plug-in, simply download the file below and drop the enclosed RichMercer.Graffiti.Plugins.dll file into your bin folder. The go to the Control Panel->Site Options->Plug-Ins and you should see the Permanent Redirect Plugin there. Simply click the button next to it to enable it and your URLs should now be redirected.

You can also choose how to handle an error. Presenting the user with a 404 error page when the post or tag doesn't exist in your Graffiti site isn't the nicest thing, so if you edit the plug-in you should see a drop down with three options:

  • Do Nothing - The plug-in does nothing and the user is taken the default error page for when a 404 error occurs.
  • Navigate Home - The user is taken the sites homepage.
  • Go to a URL - Navigates to a page you set which could be a custom error page or the search page.

If you choose 'Go to a URL' then you must enter the URL you want to redirect to in the box below.

Download the plug-in here!

Notes:

  • When a URL is redirected the plug-in will record an 'Information' event in the log telling you the name of the post/tag redirected.
  • If a URL is found to match the Community Server URL pattern but no post/tag is found, a 'Warning' even is logged in the event log.

5 comment(s) so far

Greg wrote on January 23, 2008

Would you mind sahring source for this plugin? I woudl like to write a similar plugin to deal with embedded images from a CS site moved to Graffiti and I imagine this would be a great starting point.

Thanks-

Greg

Quite inspiring,

When a URL is redirected the plug-in will record an 'Information' event in the log telling you the name of the post/tag redirected.

Thanks for writing about it

Quite inspiring,

When a URL is redirected the plug-in will record an 'Information' event in the log telling you the name of the post/tag redirected.

Thanks for writing about it

Post your comment