javascript redirection used instead of header()