Help... HTTP 500 error


#1

i’m trying to fix exclusion of googlebot from redirection. currently we have a redirection for ES (Spain) and (GB)
re:
https://centroliz.com --> https://centroliz.com/es (if Spain)
https://centroliz.com --> https://centroliz.com/gb (if UK)

using CF IP Geolocation.

here’s my code on our index.php
country_code = _SERVER[“HTTP_CF_IPCOUNTRY”];
//echo $country_code;
//echo "console.log('visitor from " . country_code . "');</script>"; if (_SERVER[‘REQUEST_URI’] == “/”) {
switch($country_code) {// case “GB”:
header(“Location: https://centroliz.com/gb”);
die();
break;
case “ES”:
header(“Location: https://centroliz.com/es”);
die();
break;
case “FR”:
header(“Location: https://centroliz.com/es”);
die();
break;
case “PH”:
//header(“Location: https://centroliz.com/ES”);
//die();
break;

    }//endswitch
 }//endif

now, my issue is, it’s returning 500
2nd issue, how can i prevent the Google bot from being redirected or flag our site for redirection?


#2

i got the website running back… just rebooted the server.

Any way that CF will inform us if our website is down?


#3

There’s no monitoring from Cloudflare. You may want to make use of external monitoring from monitis or something similar. Or setup your on premise monitoring with Nagios, Icinga, check_mk, Zabbix…


#4

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.