I have a file in my theme's folder called "test.php".
If I go to www.mysite.com/wp-content/themes/my-theme/folder/test.php the theme loads which I assume is a 404 error handled by WP. If I change the file name to be test.html I can access it no problem.
I tried adding the following code to my functions.php file (to add a rewrite rule):
add_rewrite_rule( 'test.php$', $relative_directory . '/folder/test.php [L]', 'top' );
but even having the htaccess rule didn't seem to do anything.
Any idea what could be causing this?

$wpdbfor. – EAMann♦ Jul 16 '12 at 19:09functions.phpusing a filter. Then you make the call toadmin-ajax.phpand WordPress passes it along. There's a plugin-based example in the Codex but it works the exact same way for themes. – EAMann♦ Jul 17 '12 at 16:29