add redirect test and split source