PHPackages                             superbig/craft-countryredirect - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Localization &amp; i18n](/categories/localization)
4. /
5. superbig/craft-countryredirect

ActiveCraft-plugin[Localization &amp; i18n](/categories/localization)

superbig/craft-countryredirect
==============================

Easily redirect visitors to a locale based on their country of origin

2.2.1(4y ago)82.8k↓100%3[17 issues](https://github.com/superbigco/craft-countryredirect/issues)[1 PRs](https://github.com/superbigco/craft-countryredirect/pulls)MITPHPCI failing

Since Jun 15Pushed 2y ago1 watchersCompare

[ Source](https://github.com/superbigco/craft-countryredirect)[ Packagist](https://packagist.org/packages/superbig/craft-countryredirect)[ RSS](/packages/superbig-craft-countryredirect/feed)WikiDiscussions v2 Synced 1mo ago

READMEChangelog (10)Dependencies (4)Versions (24)Used By (0)

Country Redirect plugin for Craft CMS 3.x
=========================================

[](#country-redirect-plugin-for-craft-cms-3x)

Easily redirect visitors to a Craft site based on their country of origin

[![Screenshot](resources/img/icon.png)](resources/img/icon.png)

Requirements
------------

[](#requirements)

This plugin requires Craft CMS 3.0.0-beta.23 or later.

Installation
------------

[](#installation)

To install the plugin, follow these instructions.

1. Open your terminal and go to your Craft project:

    ```
     cd /path/to/project

    ```
2. Then tell Composer to load the plugin:

    ```
     composer require superbig/craft-countryredirect

    ```
3. In the Control Panel, go to Settings → Plugins and click the “Install” button for Country Redirect. Alternatively, run the command `./craft install/plugin country-redirect`

Country Redirect Overview
-------------------------

[](#country-redirect-overview)

@TODO

Using the plugin
----------------

[](#using-the-plugin)

Before you start using the plugin, you have to do 3 things:

1. Download a updated country database database from MaxMind through the plugin settings
2. Copy the configuration file `config.php` as `country-redirect.php` into the Craft `config` directory, usually `config/`
3. Modify the configuration file to match preferences, and make sure you setup the `countryMap` setting to match your site handles.
4. Add your [MaxMind.com License Key](https://support.maxmind.com/account-faq/license-keys/can-generate-new-license-key/) obtained from the [MaxMind.com account area](https://www.maxmind.com/en/accounts/current/people/current).

Configuration
-------------

[](#configuration)

```
