Redirects for Pages Turned Off

Paul Cater asked on March 10, 2021 15:06

Is there a way to set up redirects for pages that are turned off? We have a few products we are no longer offering at this time, so we turned the pages off. But the redirects do not work when the page is turned off. If we leave the page on (even with the redirect set up), it still shows up in any widgets on other pages that it is linked. We would like to avoid removing these pages from widgets across the site in case we decide to reintroduce them at a later date.

Recent Answers


Juraj Ondrus answered on March 11, 2021 06:37

What version of Kentico are you using? Portal engine or MVC? I assume that by turning off you mean unpublishing. In this case, the page is not accessible so you need to create e.g. IIS URL rewriting rules or request event handler and redirect the requests to unpublished pages wherever you want. I do not know what widgets you mean, but you can probably add a condition into the widget configuration or code to not to list items with the redirection set (DocumentMenuRedirectUrl not null or empty) or add an extra field to the page type which will be used as a flag "show in widgets" and use this field in the widget configuration/code.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.