First of all, discrimination (per se) is not illegal. It's perfectly legal to discriminate against morris dancers, Labour Party members, smokers, people with blue eyes, cardigan wearers, or almost anything else. It's only specific forms of discrimination (such as those based upon race or gender) which are illegal.
You seem to have been rather fortunate in that you actually got some feedback from an employer. Very few employers bother to provide such feedback. Based upon my own experiences, those of others I know and also conversations with JobCentre staff, I'd be very surprised if more than one or two per cent of employers ever provide any form of feedback. The only time I've ever had any feedback (from several thousand job applications) was last year when I was told, in writing, that I was "too intelligent" for the job. I suppose that also counts as 'discrimination'!
Chris