A man who allegedly raped a 26-year-old woman inside a bus at Pune's Swargate bus station was detained in Shirur Tehsil on Friday, police said.