Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
litespeed_wiki:cache:litemage:troubleshooting:3rd-party-auto-switcher-not-redirecting-correctly [2016/05/09 20:05]
Long Hu
litespeed_wiki:cache:litemage:troubleshooting:3rd-party-auto-switcher-not-redirecting-correctly [2017/05/09 12:37]
Lisa Clarke
Line 1: Line 1:
-====== ​3rd Party Store/​Currency Auto Switcher Not Redirecting To Correct Page ======+~~NOTOC~~ 
 +====== ​Multi-Store/​Currency Auto Switcher Not Redirecting To Correct Page ======
  
-**Problem**: Some multi-store/​currency ​setup uses an auto switcher, such as Extendware'​s Store / Currency Switcher, which gracefully redirects customers to the proper store and currency based on their geo location and browser configuration. ​But with LiteMage on, this function doesn'​t work as expected.+====Problem==== 
 +Some multi-store/​currency ​setups use an auto switcher, such as [[http://​www.extendware.com/​magento-store-currency-switcher.html|Extendware'​s Store / Currency Switcher]], which gracefully redirects customers to the proper store and currency based on their geographic ​location and browser configuration. ​With LiteMage on, this function doesn'​t ​always ​work as expected.
  
-**Cause**: In order to determine which store and currency a customer should be redirected to, the customers first request must hit the backend so that the proper cookie can be set. Without this cookie, the default store will be served from cache instead. LiteMage default configuration doesn'​t check whether the request is the first one and so respond accordingly.+====Cause==== 
 +In order to determine which store and currency a customer should be redirected to, the customers first request must hit the backend so that the proper cookie can be set. Without this cookie, the default store will be served from cache instead. LiteMage default configuration doesn'​t check whether the request is the first one and so the cookie is never set.
  
-**Solution**: To fix this behavior, we need to force the customers' first request to hit the Magento backend. To achieve this, add the following rewrite rules to your ".htaccess" ​file:+====Solution==== 
 +To fix this behavior, we need to force the customer'first request to hit the Magento backend. To achieve this, add the following rewrite rules to your ''​.htaccess'' ​file:
  
 <​code>​RewriteCond %{HTTP_COOKIE} !frontend <​code>​RewriteCond %{HTTP_COOKIE} !frontend
Line 13: Line 17:
 These rules will check if the "​frontend"​ cookie is not set, which will always be the case on a customers first visit, and if the user agent is not a bot. If these conditions are met, then force the request to hit the backend using a fake cookie vary. These rules will check if the "​frontend"​ cookie is not set, which will always be the case on a customers first visit, and if the user agent is not a bot. If these conditions are met, then force the request to hit the backend using a fake cookie vary.
  
-**Notes**: In order for LiteMage'​s crawler to properly crawl your multiple currencies/​stores,​ you must also //add "/​litemage_walker/​" ​to your auto switcher'​s disabled user agents list//.+====Notes==== 
 +In order for LiteMage'​s crawler to properly crawl your multiple currencies/​stores,​ you must also add ''​/​litemage_walker/​'' ​to your auto switcher'​s disabled user agents list.
  
-In Extendware'​s Store / Currency Switcher, you can disable auto-switching for any user agents matching an input regular expression. Simply navigate to Disabled User Agents ​>> User Agent RegExp and add "/​litemage_walker/​"+In Extendware'​s Store / Currency Switcher, you can disable auto-switching for any user agents matching an input regular expression. Simply navigate to **Disabled User Agents > User Agent RegExp** and add ''​/​litemage_walker/​''​
  
  • Admin
  • Last modified: 2017/05/09 12:37
  • by Lisa Clarke