Index: contrib/redirects/middleware.py
===================================================================
--- contrib/redirects/middleware.py	(revision 5178)
+++ contrib/redirects/middleware.py	(working copy)
@@ -19,7 +19,7 @@
             except Redirect.DoesNotExist:
                 pass
         if r is not None:
-            if r == '':
+            if r.new_path == '':
                 return http.HttpResponseGone()
             return http.HttpResponsePermanentRedirect(r.new_path)
 
