I used a code copied from the internet for blocking IP according to GEO location. (Purpose of the code is to, read the IP address and redirect to a page named “Not-available”. Code works well with the Preview mode. But it does not work with the Live site.
This is the code I have used. I have attached the code as an image, because I cant post questions with Links.