Page URL resistant to PageName change

Vote:
 

Hi, 
there is demand to have a safe way of changing a name of article page (and article page only) so that newly generated URL still could be resolved with the old URL that might have been sent in a mailing list.

I thought of including a content reference in a part of url so that custom URL resolver could pick that up and do a 301 to a newly named page, but so far I didn't get far. 

There was a blog that used custom override of url rewriter implementation but that approach is now deprecated and Episerver encourages use of routes.

Approach with custom routing and placing {id} in any part of the standard Episerver {language}/{node}/{partial}/{action} gets me to 404 in any case.

Has anyone here done something similiar and if so what approach did you take?

#245595
Dec 15, 2020 20:47
Vote:
 

Hm.. if you have a 404 handler (like Geta.404handler) then you can add a redirect automatic in a published event by looking up the previous segment and the new segment, and if it is changed, then add that to the redirect handler. You should most likely do this on MovedEvent too

This will only work if no new article get the old segment as if a new article get the same segment that the 404handler will not get hit

#245616
Edited, Dec 16, 2020 7:36
Vote:
 

By default, the URL segment will not change if you change the name of the page.

If you want old URLs to work, even after changing the URL seg ment you can use the 404 handler by Geta, or this lightweight redirect module:
https://github.com/tomahg/RedirectManager

I have upgraded to the new (blue) Episerver UI in this fork. It has support for creating redirect rules when the URL segment is changed, and you can easily adapt this to take effect for article pages only, if that is what you need.

#245621
Dec 16, 2020 8:08
Vote:
 

Thomas,
is this module available to editors or is it something you can restrict access to? 

I forgot to mention that client wants to change URL segment to match the page name within the ContentPublishing event. That entails following problem: editors who do not have access to admin or in this case redirect manager would need to notify admin of that change implying that admin now gets up to 200 requests per day to maintain 'broken' URLs.

I believe that having a content ref in url (either as an trailing param or as leading param before the acctual page name) would solve this demand.

#245628
Dec 16, 2020 12:50
Vote:
 

You could control access to the module GUI. Redirects can be added automatically when the URLsegments changes, you do not need to add redirects manuallu.

You can of course also solve this by adding the content id to the url. I have seen it done successfully.

#245629
Dec 16, 2020 13:01
* 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.