Redirect domain


Kindly could you please help as as we are new with Slim Framework.
We have a multi language site.
We would like to redirect our domain directly to one of the pages.

For example ( is in english) i want when end user call it redirects to wich is the greek version of the site.

How to do this?

You can look into the Maxmind Geo IP database, that will allow you to determine the visitors country by IP address:

Maxmind offers a free database for this use case you can try.

A way to use this would be using middleware on the route for

  1. If session value visitor_country is not set:
    1.1 Determine visitor country using geo ip
    1.2 Set session value visitor_country (set to “unknown” if it could not be determined)
  2. Based on visitor_country redirect to{country_code}