Move 301 redirect code to production settings.