From: Sarah Hoffmann Date: Sat, 10 Mar 2012 11:21:08 +0000 (+0100) Subject: send 403 and HTML page on block X-Git-Tag: deploy~712 X-Git-Url: https://git.openstreetmap.org./nominatim.git/commitdiff_plain/3887469078c960437f54a71a98a6086c9706a6d3?hp=33055bcf561681a8969b3166cbed1d4aaf46ac95 send 403 and HTML page on block --- diff --git a/lib/init-website.php b/lib/init-website.php index d21ca7af..36928628 100644 --- a/lib/init-website.php +++ b/lib/init-website.php @@ -10,9 +10,12 @@ if (strpos(CONST_BlockedIPs, ','.$_SERVER["REMOTE_ADDR"].',') !== false) { - echo "Your IP has been blocked. \n"; - echo "Please create a nominatim trac ticket (http://trac.openstreetmap.org/newticket?component=nominatim) to request this to be removed. \n"; - echo "Information on the Nominatim usage policy can be found here: http://wiki.openstreetmap.org/wiki/Nominatim#Usage_Policy \n"; + header('HTTP/1.0 403 Forbidden'); + header('Content-type: text/html; charset=utf-8'); + echo "

Access blocked

"; + echo "Your IP has been blocked for overusing OpenStreetMap's volunteer-run servers.
\n"; + echo 'Please consult the Nominatim usage policy for more information.'; + echo "\n\n"; exit; }