Do you
not get the 500 error if you comment out (#) the three Rewrite... lines? If true, that isolates the problem to those lines. You'll have to show more clearly what your code looks like, so we can see if you have an error in it. I.e.,
name of my website $ is useless, while
^mydomain\.com would be helpful.
RewriteCond %{HTTP_HOST} ^(www\.)?mydomain\.com
RewriteCond %{REQUEST_URI} !^subdir/
RewriteRule ^(.*)$ subdir/$1 [L]
Is it definitely the
.htaccess file that's causing the problem, or are you being successfully redirected and the problem is a bad PHP file?