koolhq 0 Newbie Poster

Ok I am making a website and I have apache 2, php, mysql. I want users to be able to create a website(i got that part, it is easy) but I want

user.example.com to redirect to
example.com/user

with a .htaccess file