Try our conversational search powered by Generative AI!

Url Segment Removal By page id


Hi All,

I am new to EPiServer CMS, I need to remove the page segment of the url by the page id. 

For example say, If i have an url of a page like this "". I need to remove the segment "Events" by its page id on that url but the landing page must be the same.

I have tried it using the IPartialRouter interface, But I think it was pagetype specific. I need this segment removal functionality to work on the entire site, When ever the url has the segment "Events" on it , it should be removed from the url.

I dont know if this requirement is possible or not.

Can anybody help me.

Dec 17, 2015 12:51


I think the way to go here is to use the IPartialRouter interface, like you have tried. In order to do it you should have a base class for you page types, and then you can pass it to the generic parameters of the interface and it should work on the entire website.  More details on how to do this here

See also


Dec 21, 2015 13:38
* 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.