How do I directly access a PHP file located in my themes folder?
<p>I have a file in my theme's folder called "test.php".</p>

<p>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.</p>

<p>I tried adding the following code to my functions.php file (to add a rewrite rule):</p>

<pre><code>add_rewrite_rule( 'test.php$', $relative_directory . '/folder/test.php [L]', 'top' );
</code></pre>

<p>but even having the htaccess rule didn't seem to do anything.</p>

<p>Any idea what could be causing this?</p>
