Country wise redirection

Before asking, did you search first? Press :mag: at the upper right to search.

i have main domain example.com and sub directory example.com/ae , i want a specific country people when they type main domain name i want them redirected to this sub directory, how to do that, rest of the world when they type they should as usual see the main domain

Create a redirect rule here…
https://dash.cloudflare.com/?to=/:account/:zone/rules/redirect-rules

Adapt this example of how to use country codes…