# RouteRequestInfo redirect not working

**URL:** <https://forum.litium.com/t/routerequestinfo-redirect-not-working/2747>\
**Category:** Questions\
**Tags:** litium-8\
**Created:** [October 31, 2022, 2:36pm UTC](https://forum.litium.com/t/routerequestinfo-redirect-not-working/2747 "2022-10-31T14:36:52Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![kdxperbol](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/kdxperbol/32/513_2.png) [@kdxperbol](https://forum.litium.com/u/kdxperbol)\
**Post date:** [October 31, 2022, 2:36pm UTC](https://forum.litium.com/t/routerequestinfo-redirect-not-working/2747/1 "2022-10-31T14:36:52Z")

</div>

Using RouteRequestInfo inside PageNotFoundDecorator to redirect user, but no result after executing this code

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/litium/original/1X/2438dadfb3034aa05c2929a5dd57d1125dbcfd89.png)

---

<div class="post-metadata">

**Author:** ![steve.redstorm](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/steve.redstorm/32/14_2.png) [@steve.redstorm](https://forum.litium.com/u/steve.redstorm)\
**Post date:** [October 31, 2022, 3:32pm UTC](https://forum.litium.com/t/routerequestinfo-redirect-not-working/2747/2 "2022-10-31T15:32:11Z")

</div>

I can not see the whole method but did you try setting these also?

> result.PageSystemId = page.SystemId;  
> result.DataPath = url;

---

<div class="post-metadata">

**Author:** ![patric.forsgard](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/patric.forsgard/32/10_2.png) [@patric.forsgard](https://forum.litium.com/u/patric.forsgard)\
**Post date:** [October 31, 2022, 4:21pm UTC](https://forum.litium.com/t/routerequestinfo-redirect-not-working/2747/3 "2022-10-31T16:21:11Z")

</div>

The `IPageNotFoundResolver` is used to find the page in the website structure that should be visible for the user in case that the current URL not matching any existing page, category or product page.

If you want an url-redirect, you should use the `IUrlRedirectResolver` instead, then the handler will redirect the user to the requested page.

Note: When doing a permanent redirect, the browser will cache the result so if the site later getting a page, category or product that should be visible on the same URL some users will anyway end up in the previous redirected URL and in this case to recover the user from the old redirect URL you need to redirect the user back again.

---

<div class="post-metadata">

**Author:** ![kdxperbol](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/kdxperbol/32/513_2.png) [@kdxperbol](https://forum.litium.com/u/kdxperbol)\
**Post date:** [November 1, 2022, 8:06am UTC](https://forum.litium.com/t/routerequestinfo-redirect-not-working/2747/4 "2022-11-01T08:06:47Z")

</div>

I’m not setting this, because I’m not sure I can get page object for product page, so I use RedirectPermanent

---

<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 29, 2022, 8:06am UTC](https://forum.litium.com/t/routerequestinfo-redirect-not-working/2747/5 "2022-11-29T08:06:56Z")

</div>

Closed on November 29, 2022, 8:06am UTC

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