Banning their IP and showing a "You have been banned page" will still use up system resources, so if someone is DDoSing you banning their IP(s) won't make it go away. But then it depends how they are doing it - HTTP requets or a good old SYN flood. You might get slightly better results banning the IPs at a firewall level, or even better get yourself a decent Cisco threat detecting router (or find a host that uses them).