Fixing multiple redirects for invalid pages by return