Debugged redirect.js