In the web control panel, go to Domains -> Web
Find the domain and click on "Edit"
Now you have five options.
1. Fully hosted.
2. A Parked Domain
3. A Domain Redirect (domain that redirects to another site immediately / browser URL changes).
4. Display another site at your domain (using a frame; browser URL remains the same).
5. A Mirrored Domain (a domain that mirrors another site's content / browser URL remains the same).
Of course if it is set to #1, you could have an .htaccess file that attempts to redirect using Apache directives.
What exactly is it currently set to, and what exactly did you expect to happen?
If you really want the files from ~/example.com/subdir to show up when browsing http://sub.example.com/, you need to make the subdomain fully hosted and specify that subdirectory as the "Web Directory". In the event you want to files from ~/example.com/subdir to show up when browsing to http://sub.example.com/subdir, use the Remap Sub-Dir panel.
Perl / MySQL / HTML CSS