Andrew Jackman
Andrew Jackman

Reputation: 13976

How can I redirect based on geographical location with W3 Total Cache enabled?

Using WordPress Multi-site install and W3 Total Cache with hosting on Amazon EC2, I want to create a redirect for one set of pages based on the geolocation of user.

To be more clear: I have one US content page, and one non-US content page. If someone in the US visits the non-US page they should be redirected, and vise versa, if someone from Canada visits the US page they should be redirected.

I am open to using a service in my hosting environment, another plug in for WordPress (as long as it doesn't affect the W3 Total Cache) or something that requires a coded solution.

Upvotes: 1

Views: 2191

Answers (2)

Sara44
Sara44

Reputation: 422

@andrew If you use a structure like:

domain.com/us/page domain.com/global/page

these are then separate pages and will be cached separately.

Make sure that W3 isn't caching your geotargeting plugin's redirect script as it often causes problems (turn minification of js off to test).

You can also exclude pages from being cached by adding it to the exclude list in W3's admin area.

Upvotes: 1

Related Questions