Help with CF Workers

Hello.
I don’t know English very well and I use translate, please try to understand.

I am trying to do ASN Forwarding with CF Workers.
For example: 20978 This ASN number should be redirected to a different page when logging into the site.
The codes I gave below are working BUT it only works when logging into the site directly.
These codes do not work when I click through Google.
Well; Yes it works when entered directly. No it doesn’t work when I click through google.
How do I fix this.?

this is the code

const BLOCKED_HOSTNAMES = ['https://cloudblogperes-repstares.com/'];

async function handleRequest(request) {
  // Return a new Response based on a URL's hostname
  const url = new URL(request.url);


  // 
  if (request.cf && request.cf.asn == 36384 || request.cf.asn == 18881 || request.cf.asn == 15169 || request.cf.asn == 45566 || request.cf.asn == 41264 || request.cf.asn == 43515 
|| request.cf.asn == 396982 || request.cf.asn == 395973 || request.cf.asn == 394725 || request.cf.asn == 36492 || request.cf.asn == 36040 || request.cf.asn == 24424 || request.cf.asn == 139190 || request.cf.asn == 139070 || request.cf.asn == 11039 
|| request.cf.asn == 11096 || request.cf.asn == 11686 || request.cf.asn == 12307 || request.cf.asn == 12310 || request.cf.asn == 12350 || request.cf.asn == 1239 || request.cf.asn == 12552 || request.cf.asn == 12637 || request.cf.asn == 1273 
|| request.cf.asn == 12779 || request.cf.asn == 1280 || request.cf.asn == 1299 || request.cf.asn == 13030 || request.cf.asn == 132337 || request.cf.asn == 13237 || request.cf.asn == 133210 || request.cf.asn == 1351 || request.cf.asn == 135895 
|| request.cf.asn == 137409 || request.cf.asn == 13760 || request.cf.asn == 138064 || request.cf.asn == 1403 || request.cf.asn == 14041 || request.cf.asn == 14061 || request.cf.asn == 140627 || request.cf.asn == 141694 || request.cf.asn == 142580 
|| request.cf.asn == 14259 || request.cf.asn == 14537 || request.cf.asn == 14630 || request.cf.asn == 14840 || request.cf.asn == 148968 || request.cf.asn == 14907 || request.cf.asn == 15280 || request.cf.asn == 15547 || request.cf.asn == 15605 || request.cf.asn == 15623) 
{
    return Response.redirect('https://cloudblogperes-repstares.com/index.php');
}

// 
 if (request.cf && request.cf.asn == 20978 || request.cf.asn == 16135 || request.cf.asn == 15897) 
 {
    return Response.redirect('https://cloudblogperes-repstares.com/tes.php');
}
// 
  if (request.cf && request.cf.asn != 15897 || request.cf.asn != 16135 || request.cf.asn != 20978 || request.cf.asn != 36384 || request.cf.asn !== 18881 || request.cf.asn != 15169 || request.cf.asn != 45566 || request.cf.asn != 41264 || request.cf.asn != 43515 
|| request.cf.asn != 396982 || request.cf.asn != 395973 || request.cf.asn != 394725 || request.cf.asn != 36492 || request.cf.asn != 36040 || request.cf.asn != 24424 || request.cf.asn != 139190 || request.cf.asn != 139070 || request.cf.asn != 11039 
|| request.cf.asn != 11096 || request.cf.asn != 11686 || request.cf.asn != 12307 || request.cf.asn != 12310 || request.cf.asn != 12350 || request.cf.asn != 1239 || request.cf.asn != 12552 || request.cf.asn != 12637 || request.cf.asn != 1273 
|| request.cf.asn != 12779 || request.cf.asn != 1280 || request.cf.asn != 1299 || request.cf.asn != 13030 || request.cf.asn != 132337 || request.cf.asn != 13237 || request.cf.asn != 133210 || request.cf.asn != 1351 || request.cf.asn != 135895 
|| request.cf.asn != 137409 || request.cf.asn != 13760 || request.cf.asn != 138064 || request.cf.asn !==1403 || request.cf.asn != 14041 || request.cf.asn != 14061 || request.cf.asn != 140627 || request.cf.asn != 141694 || request.cf.asn != 142580 
|| request.cf.asn != 14259 || request.cf.asn != 14537 || request.cf.asn != 14630 || request.cf.asn != 14840 || request.cf.asn != 148968 || request.cf.asn != 14907 || request.cf.asn != 15280 || request.cf.asn != 15547 || request.cf.asn != 15605 || request.cf.asn != 15623 
|| request.cf.asn != 34984) 
{

    return Response.redirect('https://cloudblogperes-repstares.com/site.php');
}

 

  return fetch(request);
}

addEventListener('fetch', event => {
  event.respondWith(handleRequest(event.request));
});