Ваш синтаксис неправильный, попробуйте удалить лишние jQuery. ajax ({}) и точку с запятой, например:
jQuery.ajax({
url: '//freegeoip.net/json/',
type: 'POST',
dataType: 'jsonp',
success: function(location) {
// If the visitor is browsing from Turkey.
if (location.country_code === 'TR') {
// Redirect him to the .
window.location.href = 'new url';
} else {
return false;
}
}
});