Kentico - is it possible to Schedule a redirect / alias to maintenance page?

Tom Wisneski asked on March 30, 2021 16:38

An upcoming maintenance to processes on several of our Kentico 11 websites that use SAP webservices. During the maintenance time block, we will either need to redirect to another page or create an alias to a page that will display during this maintenance period. Is there a way in Kentico to schedule an alias or redirect? To schedule it to both turn on and turn off (then go back to its original or initial url). Thanks, did not find any information on such a request.

Recent Answers


Juraj Ondrus answered on March 31, 2021 05:33

Well, you can schedule creation/deletion of the app_offline.htm file in the web root - so this file is displayed during the maintenance (check on Google what this file means for IIS). Or, you can use this interface in Kentico to put the site offline. But there is no schedule setting.

0 votesVote for this answer Mark as a Correct answer

Tom Wisneski answered on March 31, 2021 15:25 (last edited on March 31, 2021 15:26)

Juraji --- thanks for the reply. The later option would not work for us in this case. Being the entire site(s) are not down during the maintenance time block. Just specific processes on certain pages. So an across-the-board message regarding site in accessible due to maintenance will not work. Most likely will have to just do manual redirects (alias) at the start and end time. Thanks again though.

0 votesVote for this answer Mark as a Correct answer

Bogdan Buczek answered on April 21, 2021 20:26

Juraj,

We are using Kentico 12SP (hotfix38). The offline mode doesn't work like it should in my opinion. I followed the instructions from :

Switching sites to off-line mode

I see the message:

The site is currently off-line. To enable site visitors to access the site, bring the site on-line.

and the site is still alive and well, when it should be showing the offline page. The database SELECT [SiteIsOffline] FROM [KenticoCMS].[dbo].[CMS_Site] is true.

What is missing that the site doesn't go offline. I recycled IIS pool, reset IIS. The site is still showing like it was live.

The only way I could make it go offline is the app_offline.htm

Thoughts?

0 votesVote for this answer Mark as a Correct answer

Tom Wisneski answered on April 21, 2021 20:38 (last edited on April 21, 2021 20:39)

Bogdan & Juraj, just ended up using redirects in our case. Though in hindsight, we could have created a scheduled task that would change the Redirect URL value. You can access the Redirect value(s) in the Kentico CMS_Document table in SQL. The fields of interest are, "DocumentMenuRedirectURL" and "DocumentUserNamePathForUrlPath." Thanks.

0 votesVote for this answer Mark as a Correct answer

Bogdan Buczek answered on April 21, 2021 21:10

Tom,

Thanks for reply.

Do you mean you used the offline mode option to: Redirect visitors to the following URL

This option doesn't work for me, either. I might be missing some MVC parts? I don't know, I am new to Kentico.

0 votesVote for this answer Mark as a Correct answer

Tom Wisneski answered on April 21, 2021 21:43 (last edited on April 21, 2021 21:44)

Bogdan -- We ended up not doing or using the offline mode option. Just had gone in and manually changed URL Redirects during the time period of maintenance (to a maintenance message page). Then back again once the maintenance was completed. What I mentioned above was something I thought about afterwards and if it was planned with more time. Kentico Sql tables has the values of the page fields (the ones I mentioned were for the redirects). So a custom webpart could have done a Sql call (query), to change the value when the page was fired. Using a scheduled task to open and fire the page event. Then another page event created to reverse the process with another scheduled task. Now this was for 10 different processes and pages in a given time block on 6 different websites. However, it was not the entire given website or sites. That would be different. The initial question was regarding pages on sites and not an entire site. Which seems like what you are facing. Thanks.

0 votesVote for this answer Mark as a Correct answer

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