Add URL Rewrite Rule To WordPress

First you need to register your expected variables. Something similar to:

function my_rewrite() {

    add_rewrite_tag('%ct_city%', '([^&]+)');
    add_rewrite_tag('%country%', '([^&]+)');

}
add_action('init', 'my_rewrite', 10, 0);

Then you need to create the rule which will redirect to your abm page. Note that you will need to discover your abm‘s ID, since you will need to pass it in the rule.

function my_rewrite_rule() {

    add_rewrite_rule(
        '^abm/([^/]*)/([^/]*)/?', //each ([^&]+) for each registered variable in their respective order
        'index.php?page_id=10&country=$matches[1]&ct_city=$matches[2]', //assign the variable to their respective value and the page_id
        'top'
    );

}
add_action('init', 'my_rewrite_rule', 10, 0);

Finally, you will just need to edit your code to use $wp_query->query_vars['ct_city']; instead of $_GET['ct_city'];

Don’t forget to save your Permalinks structure after the change so the rule is applied. Also note that this rule will only apply for the exact match: /abm/country/city. So if someone access /abm/country it will not get catched, so you will probably need to create special rules for those too.