Redirect all URLs in WordPress and Permalink to by country to subdomain

You can try to check the visitor country via the geojs.io, and then build the logic for redirecting. See the JS code below: geoTargeting(); function geoTargeting() { return new Promise((resolve, reject) => { fetch(‘https://get.geojs.io/v1/ip/country.json’).then(response => response.json()).then(data => { const currentHostname = window.location.hostname; const currentPath = window.location.pathname; let newUrl; if (data.country === ‘US’) { // Check … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)