• Hi

    I have a sales site, which I need to be open to anyone, except for users from a particular city (where I live). Can anyone tell me if there is a way to set up a redirect to a different site for people in my own town? (Adelaide, South Australia)

    So:

    Anyone, anywhere in the world goes straight to https://www.mysite.com
    EXCEPT, [Adelaide, South Australia], redirect to https://www.mysite2.com

    Thanks muchly

    Jim

Viewing 5 replies - 1 through 5 (of 5 total)
  • I think you need to handle this in your htaccess file directly, before they even get to wordpress.

    Thread Starter 0ldfart

    (@0ldfart)

    Ok. So what would be involved in making an .httaccess that would do this?

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    Somewhere there’s code that can detection country of origin, and you might be able to leverage that. Look up using .htaccess to redirect based on country. Yes, I know Adelaide isn’t it’s own country, but once you have the basic idea you could use that.

    I have a couple of scripts which use IPs to identify visitors. This is an unreliable way to filter as visitors can use one or more proxies to bypass the filters. The visitor might just be using an account, legitimately, which provides an IP address from out of town/state/country.

    Google identifies the computer I use at work as being used by a Chinese person and shows a Chinese language page when I visit Blogger. I am in Adelaide so they are very wrong but the company I work for is owned by a Hong Kong corporation.

    If Google can’t do it reliably it probably can’t be done except by GPS location tricks but they only work if your visitors are using a smart phone or tablet with all the goodies turned on. Really smart users of these tools turn all that stuff off except when they want to use it themselves.

    .htaccess cannot do this well either.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    Alas, entirely true :/

    There’s no foolproof way to determine WHERE someone is from.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘How do I redirect users from a particular city?’ is closed to new replies.