So the problem was with trailing *. I am not sure why, but having * within the URL (www..*.amazonaws.com) is fine, but (www.example.com/\**) is treated literally, so matches the exact URl with * at the end