Show 404 page on illegal domain
diff --git a/index.cgi b/index.cgi
index 8a7a72e..d618250 100755
--- a/index.cgi
+++ b/index.cgi
@@ -11,6 +11,7 @@
 import webnotes
 import webnotes.handler
 import webnotes.auth
+import webnotes.defs
 
 def init():
 	# make the form_dict
@@ -23,6 +24,8 @@
 		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