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?