How to Enable geoip on magento with varnish page cache

Posted by molleman on Server Fault See other posts from Server Fault or by molleman
Published on 2013-10-19T14:21:33Z Indexed on 2013/10/19 15:57 UTC
Read the original article Hit count: 360

Filed under:
|
|
|
|

I currently have 3 stores online with 3 different domains, running magento with Apache and varnish (using Phoenix page cache extension) running on centos

One store is for uk, another for Ireland and another for USA

Trouble is (Example) If an US user hits the uk store , I would like the user to be notified to go to the correct store on the page, (I do not want them automatically redirected)

I was able to php-pecl-geoip with maxmind database to get this to work, but as users on my website have increased I had to begin using varnish.

how could I implement this functionality on with varnish so I know what country the user is from so I can display a message to the user to view their relevant website?

© Server Fault or respective owner

Related posts about apache2

Related posts about php