From b319d2cffae8f07b3e916739d50727bbca65efcf Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Fri, 17 Feb 2012 12:47:36 +0530 Subject: [PATCH] Show 404 page on illegal domain --- index.cgi | 3 +++ 1 file changed, 3 insertions(+) diff --git a/index.cgi b/index.cgi index 8a7a72e40b..d618250ae4 100755 --- a/index.cgi +++ b/index.cgi @@ -11,6 +11,7 @@ sys.path.append('erpnext') import webnotes import webnotes.handler import webnotes.auth +import webnotes.defs def init(): # make the form_dict @@ -23,6 +24,8 @@ def init(): webnotes.http_request = webnotes.auth.HTTPRequest() except webnotes.AuthenticationError, e: pass + except webnotes.defs.IllegalDomainException, e: + print "Location: " + (webnotes.defs.redirect_404) def respond(): import webnotes