# Resolve new url to page from old url

**URL:** <https://forum.litium.com/t/resolve-new-url-to-page-from-old-url/2222>\
**Category:** Questions\
**Tags:** litium-7\
**Created:** [September 28, 2021, 11:54am UTC](https://forum.litium.com/t/resolve-new-url-to-page-from-old-url/2222 "2021-09-28T11:54:25Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![martin](https://avatars.discourse-cdn.com/v4/letter/m/73ab20/32.png) [@martin](https://forum.litium.com/u/martin)\
**Post date:** [September 28, 2021, 11:54am UTC](https://forum.litium.com/t/resolve-new-url-to-page-from-old-url/2222/1 "2021-09-28T11:54:25Z")

</div>

Is there any builtin way in litium to resolve a url to a category page from an old url, we changed the name of the category.

Litium version: 7.6.3

---

<div class="post-metadata">

**Author:** ![NilsN](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/nilsn/32/302_2.png) [@NilsN](https://forum.litium.com/u/NilsN)\
**Post date:** [September 28, 2021, 12:16pm UTC](https://forum.litium.com/t/resolve-new-url-to-page-from-old-url/2222/2 "2021-09-28T12:16:03Z")

</div>

Litium should to this automatically. If an URL results in a 404, a check is made if there used to be anything there. And there was, it will check if the same thing still exists, but at another URL. The history is stored for pages, products and categories.

---

<div class="post-metadata">

**Author:** ![Ericsj11](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/ericsj11/32/899_2.png) [@Ericsj11](https://forum.litium.com/u/Ericsj11)\
**Post date:** [September 28, 2021, 12:17pm UTC](https://forum.litium.com/t/resolve-new-url-to-page-from-old-url/2222/3 "2021-09-28T12:17:27Z")

</div>

Do you mean in the code? I used this a long time ago, but that code never went live.

```
IoC.Resolve< RoutingHelperService> ().TryGetCategoryUrlHistory(
```

---

<div class="post-metadata">

**Author:** ![martin](https://avatars.discourse-cdn.com/v4/letter/m/73ab20/32.png) [@martin](https://forum.litium.com/u/martin)\
**Post date:** [October 5, 2021, 1:03pm UTC](https://forum.litium.com/t/resolve-new-url-to-page-from-old-url/2222/4 "2021-10-05T13:03:15Z")

</div>

Is there any service we can use to check the history of a url?  
We have the following url:  
/newcategoryname/subcategory  
And whenever the old url is used:  
/oldcategoryname/subcategory  
We want to do some processing of that url and redirect to the new url ourselves.  
RoutingHelperService unfortunately does not provide us with the information we need to do this, and it assumes we know the categorySystemId.  
Perhaps we are trying to mess with the internal functioning of urls too much?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex030/uploads/litium/original/1X/12eddac3b8b661de1db86af10ac8151b571e6fb9.png) [@system](https://forum.litium.com/u/system)\
**Post date:** [November 2, 2021, 1:03pm UTC](https://forum.litium.com/t/resolve-new-url-to-page-from-old-url/2222/5 "2021-11-02T13:03:54Z")

</div>

Closed on November 2, 2021, 1:03pm UTC

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
