Redirect to delete page instead of showing HTML on API