Geta / geta-notfoundhandler

The popular NotFound handler for ASP.NET Core and Optimizely, enabling better control over your 404 page in addition to allowing redirects for old URLs that no longer works.
Apache License 2.0
19 stars 15 forks source link

New redirects take a while to start working on all site instances #99

Open MizterDuster opened 10 months ago

MizterDuster commented 10 months ago

Hello friends at Geta,

Geta.NotFoundHandler.Optimizely - 5.0.6 Optimizely CMS - 12.17.1

We have a multi-site/multi-culture website and are experiencing strange behavior with the new redirects created in the notfound handler. We create a number of redirects for URLS intended for use by QR codes only, so there is never an existing page. When we create the redirect, we noticed that periodically the redirect would work and other times the redirect would not, and we would get a 404 page. We found that if we used one of sites ARRAfinity's, that the URL would redirect and the other instance would fail.

We suspect that there is some sort of propagation that occurs, or cache that is being accessed that maybe isn't getting fully updated when a new redirect is created. Is there some way to ensure that new redirects get propagated to each of the web site instances? A scheduled job perhaps?

The redirect

The target

Works with only 1 arrafinity

works with both arrafinity's

Its odd that the .com vs .nl would behave differently, hence why we think there could be some caching issue that slowly gets resolved as the day goes on, so if there is a way to perform a cache clear/bust or if we need to run the jobs manually to ensure that new redirects act correctly.

Thank you for your help

johanbenschop commented 10 months ago

One of our content editors has just reported a similar issue. It seems, in our case at least, that we simply overlooked adding app.UseOptimizelyNotFoundHandler(); to the Startup.cs next to the app.UseNotFoundHandler();. I still need to PR it, deploy & test it, since production is the only environment with multiple servers this will take some time.

It might be the case that you also don't have the app.UseOptimizelyNotFoundHandler(); added.

mikemalloy-commscope commented 1 month ago

@MizterDuster did you ever find a resolution to your issue? Since we went live in the DXP with 165,000 redirects we see the same issue. Sometimes redirects added don't work right away.