Created
April 3, 2019 09:37
-
-
Save koehnlein/a07a96443cc9a16d15e782999667b4c1 to your computer and use it in GitHub Desktop.
Redirect configuration for einpraegsam/ipandlanguageredirect
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
return [ | |
'actions' => [ | |
[ | |
'referrers' => [ | |
'*', | |
], | |
'events' => [ | |
'redirect' | |
] | |
] | |
], | |
'globalConfiguration' => [ | |
// show suggest message or do a redirect only if the user visits home (not for subpages) | |
'actionOnHomeOnly' => false, | |
// don't redirect to the home-page, try to stay on the same page while changing the language | |
'stayOnCurrentPage' => true | |
], | |
'noMatchingConfiguration' => [ | |
'identifierUsage' => 'german', | |
'matchMinQuantifier' => 15 | |
], | |
'redirectConfiguration' => [ | |
// this number means: pid | |
1 => [ | |
// this number means: language parameter | |
0 => [ | |
'identifier' => 'german', | |
'browserLanguage' => [ | |
'*' | |
], | |
], | |
1 => [ | |
'identifier' => 'english-apac', | |
'browserLanguage' => [ | |
'en' | |
], | |
], | |
2 => [ | |
'identifier' => 'english-europe', | |
'browserLanguage' => [ | |
'en-gb' | |
], | |
], | |
3 => [ | |
'identifier' => 'english-usa', | |
'browserLanguage' => [ | |
'en-us', | |
'en-ca' | |
], | |
], | |
4 => [ | |
'identifier' => 'chinese', | |
'browserLanguage' => [ | |
'zh', | |
], | |
], | |
], | |
], | |
'quantifier' => [ | |
'browserLanguage' => [ | |
'totalMatch' => 7, | |
'wildCardMatch' => 3 | |
], | |
'countryBasedOnIp' => [ | |
'totalMatch' => 13, | |
'wildCardMatch' => 5 | |
], | |
'actions' => [ | |
'referrers' => [ | |
'totalMatch' => 7, | |
'wildCardMatch' => 3, | |
] | |
] | |
] | |
]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment