RouteRequestInfo redirect not working

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

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

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

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.

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

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