Skip to content

Is there a way to autoRedirectEnabled only on first time page load? #48

@mateostabio

Description

@mateostabio

Hello, I have got GeoMate working now. I set it up like this.

      'autoRedirectEnabled' => 'true',

      'redirectMap' => [
         'usa_en' => [
            'country' => 'us'
         ],
         'canada_fr' => [ // matches 'fr-CA'
            'language' => 'fr',
            'languageRegion' => 'ca',
         ],
         'canada_en' => [ // matches 'en-CA'
             'language' => 'en',
             'languageRegion' => 'ca',
         ]
     ]

First, it only redirects if I am using a USA IP, but if I'm in Canada, it just doesn't redirect, is it possible to redirect a user if he is in Canada, and the browser language is set to French to be redirected to 'canada_fr' and if a user is Canada with browser language English, to be redirected to 'Canada_en'? What am I missing?

Second, if the user gets redirected to the US country site because he is traveling, but actually wants to go to Canadian site, is there a way to let the user click on Canada on the site, and 'autoRedirectEnabled' allows it? Or is there a way to have "autoRedirectEnabled" only for first-time visit, but then if the user selects a different country site language he is directed to that one instead?

Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions