Recommended way to setup permanent redirects in Episerver 7.5



I need to setup some permanent redirecting in EPiServer 7.5, but what is the recommended approach? I have read Joel's article ( about partial routing and segments and I was leaning towards using the segment-approach, but I am not sure it is the correct approach.

Creating an HTTPHandler could also be an option?

The urls looks similar to this:


and the new url is:


Basically, the parameters of the 'old url' have been turned into segments in the new url and the page to redirect to is placed differently in the page hierachy.


Does it make sense?


Best regards


Feb 06, 2014 10:46

I would suggest that you use routes.

Most of the time I think it's easier for you to determine your rules by code than to setup handlers in config.

Feb 06, 2014 13:21

If this is an existing solution, you should also have SEO in mind - old urls should return 301 Moved Permanently.

Feb 06, 2014 13:46

It is an existing site, so you are right Mari it should return a 301 moved permanently. 


Any suggestions on which approach to take? Is HttpHandler the correct way then?

Edited, Feb 06, 2014 15:57
Edited, Feb 07, 2014 8:27

You could also use the 404 module - see

The module supports xml import of redirect rules in format:



Feb 07, 2014 8:44

Thank you for the suggestions.

We are already using the 404-module, but in this case it is more than 1000 URLS that we need to remap, so I am not so keen on the xml import approach due to the risk of errors happening (typing). Additionally, I already got some code in place that can parse the old URL into an object, which should make it easier to map into the new URL.

Feb 07, 2014 13:05

I ended up just adding a route and implemented an IRouteHandler, like:

RouteTable.Routes.Add("ROUTENAME", new Route("ROUTEURL", new IRouteHandlerImpl));



ROUTENAME = name of route

ROUTEURL = url-pattern to match

new IRouteHandlerImpl = implementation of the interface IRouteHandler

Feb 13, 2014 11:17
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.