-
Notifications
You must be signed in to change notification settings - Fork 120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GeoIP redirect only works on first view #352
Comments
I am not sure if this is intended behaviour or not but to me it makes sense that if the redirect is in place it would happen every time the customer visits the site, not just the first time. |
This is the intended behavior as we do not want to be redirecting user over and over. |
To clarify is this to stop redirect loops between stores or explicitly to stop them being redirected from a store on the second attempt to view? |
It prevents us from popping up the redirect dialog on every page load. |
Right so this is set up for the popup really, not the browser redirect? I think for the popup it makes sense. Personally I think for the browser redirect it makes more sense that the same behaviour happens every time the other site is visited, not just the first. |
The popup triggers a redirect and the assumption is once the user has been using the site ie. by having a cookie that they have made a decision which country store to use. This is the reason why we avoid putting up again. |
I'm not sure that it makes sense. I'd rather have a popup/redirect occur if the referrer is not from one of the other store views. The issue I'm having is that if someone posts a link in Facebook/Insta/blog to us.mysite.com and the user is from Europe, they get taken to eu.mysite.com. Which is good, and what I would want. But if they then hit back, and click a second link in Facebook to us.mysite.com, then they are not redirected a second time. That is very confusing behavior. |
Hi, forcibly redirecting a customer to the store view mapped to his GEO location on EVERY visit is a feature we need, too. |
this is the solution we came up with studioraz@a87ac10 |
Steps to Replicate
Expected Result
User is again redirected to store A
Actual Result
User stays on store B and is not redirected
Findings
If seems the probem is occuring in the ESI request to /fastlyCdn/geoip/getaction/. The code this outputs to redirect the browser would typically look something like this.
When this is output correctly the redirect works. However when returning to store B the second time this request returns an empty 200 response meaning the redirect does not get triggered. I believe this can be traced back to the following VCL.
After this redirect occurs store B has both X-Magento-Vary and form_key cookies set so further redirects will not happen until the users cookies are cleared.
The text was updated successfully, but these errors were encountered: