PHP Get Current Filename After URL Rewrite
<p>I know <code>$_SERVER["REQUEST_URI"];</code> can be used to get the url of the current page, but this doesnt work if the URL is a htaccess URL rewrite.</p>

<p>How can I get the real (not rewritten) filename of the current php file?</p>

<p>For example I go to <a href="http://site.com/page/" rel="nofollow">http://site.com/page/</a> it rewrites and displays <a href="http://site.com/page.php" rel="nofollow">http://site.com/page.php</a>  </p>

<p><code>$_SERVER["REQUEST_URI"];</code> will just give me the rewrite, I want the original.</p>
