How to set up wildcard subdomains?

Submitted by Anonymous (not verified) on Tue, 03/31/2009 - 02:59

I want to setup wildcard subdomains. Also anything.example.com must be redirected or located to example.com. Can I do it with .htaccess or httpd.conf or do I need to change dns settings too ?