Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow multiple countries to redirect to the same site #7

Closed
jsunsawyer opened this issue Mar 14, 2019 · 1 comment
Closed

Allow multiple countries to redirect to the same site #7

jsunsawyer opened this issue Mar 14, 2019 · 1 comment

Comments

@jsunsawyer
Copy link

We have a multi-site setup where each site represents a language/location.

Currently, we can set up our redirectMap with rules for each site.

What we want to do is add some additional settings for countries that aren't set up yet (or never will be) and redirect them to another site (one that already has its own redirect set).

Example:

'redirectMap' => [
    'de_ch' => [
        'country' => 'ch',
    ],
    'de_de' => [
        'country' => ['de', 'at']
    ],
    'us' => [
        'country' => 'us'
    ],
    'global' => '*'
]

Here, we'd want any user whose country is in de or at to be directed to our de_de site.

This might not account for more complex combinations of detection settings that some users may require, but would at least allow us to have a bit more control.

@aelvan
Copy link
Contributor

aelvan commented Mar 15, 2019

Can't believe I didn't think of this use-case, thanks for making me aware of it. Added support for using arrays as values in the redirect map in 1.0.4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants