For Workes & Pages, what is the name of the domain?
verk.design
What is the error number?
There is no error yet
What is the error message?
There is no error message yet
What is the issue or error you’re encountering
I want only to get some help about configuration…
What steps have you taken to resolve the issue?
Hi!
There is no issue, error orother problem yet… I would like help configuring the service so that I can properly redirect my users.
On my page verk.design I want to configure the following:
Client from Poland - redirect to verk.design/pl
Client from all other countries/languages redirect to verk.design
–
I have read about workers and created something like this:
addEventListener(‘fetch’, event => {
event.respondWith(handleRequest(event.request))
})
async function handleRequest(request) {
const country = request.headers.get(‘cf-ipcountry’)
if (country === ‘PL’) {
return Response.redirect(‘verk.design/pl’, 301)
} else {
return Response.redirect(‘verk.design’, 301)
}
}
–
My site is working on WP + WC with WMPL plugin. WPML config attached.
Pls. help me, if I am right with this code and how to add it propelry to Cloudf. Or maybe there is some other solution to get result as expected…
Thanks…