Source

djangotoolbox / djangotoolbox / middleware.py

Diff from to

djangotoolbox/middleware.py

                 request.path.startswith(NON_REDIRECTED_BASE_PATHS)):
             return
         if host not in settings.ALLOWED_DOMAINS:
-            return HttpResponseRedirect('http://' + settings.ALLOWED_DOMAINS[0])
+            return HttpResponseRedirect('http://' + settings.ALLOWED_DOMAINS[0]
+                                        + request.path)
 
 class NoHistoryCacheMiddleware(object):
     """