Now there is something that might cause trouble. I’m using a 200 code, which means the rewrite is not forced. So for this one:
/fr/contact/ /fr/contact/ug2.html 200 Country=fr
We do have a /fr/contact/index.html so if found, I guess the rewrite should not happen. Yet, it does happen most of the time, until it does not, and then it all it take is a redeploy of the site.
Maybe a conflict between the browser’s default resolution of index.html for any directory and this 200 status code…
That does seem like it would cause some problems, Regis. You mentioned in the helpdesk that perhaps things started working better when you reconfigured things based on that realization - what configuration did you end up with?
But you still have an index.html in /investors/governance, it seems like? I’m glad to hear it is working well, but I am not certain that it will always work well. If you’ve seen it working well, great! Trailing slashes are tough on netlify (and on site visitors - sometimes people type them or don’t, even if you create all the links correctly on your own pages).
Forcing redirects where possible is definitely a useful trick to reducing complexity in how we parse them, so that was a good instinct
Yes for users not from the US, we serve the index.html (no redirect rules needed) which I guess Netlify/browser can resolve itself from /investors/governance/ but for visitors from the US we serve /investors/governance/ug1.html
That’s why I forced the redirect, to make sure it happened to US visitors even though there was a page available at /investors/governance/.
Can you tell me what make you think that, and how this could be addressed?
Hi @regisphilibert,
We’ve been facing a very similar problem as you. Interestingly, our redirects were working for over a year and then we started experiencing very similar symptoms as you have outlined.
We found a really strange behaviour that if we went in and cleared cookies (that were being set by Google Analytics, Facebook, intercom and few other services) via the inspector then the reloaded the page, it would refresh and the geo would work again, but only once as the cookies we set again by these services. Would be keen to see if you can reproduce this under your old configuration. Do you have any cookies being set on your site, not including nf_country by Netlify?
Interesting that you’ve found a workaround with the trailing slash. However, this shouldn’t be the expected behaviour at all.