There are 4 steps:
1. Set up an error document in your .htaccess file that redirects every single 404 to a file called maybe redirection.php
2. Add a wildcard DNS record in your zone files, so that [whateverhere].yourdomain.com points to the domain IP.
3. Add a wildcard serveralias in your apache configs by using:
4. Write the following code in your redirection.php file
So when someone enters a subdomain, let's say myself.yourdomain.com they get redirected to yourdomain.com/myself.