It's not UK law, it's the letting agent trying to reduce their exposure to risk. If they won't budge, you can't pay upfront, and your uni doesn't offer a service such as the one mentioned above, then you'll have to try and find another landlord who will take you.
In second year, I lived with an EU student, and the landlord concluded that because it was a joint and several tenancy, and he had 6 other UK guarantors, he'd accept an EU guarantor instead. Others will want 6 months rent upfront.