Is there a way to get the actual 开发者_StackOverflowurl of a file after mod_rewrite using PHP or Curl?
BASIC EXAMPLE
This --> example.com/test
I want this --> example.com/test.php
$_SERVER["REQUEST_URI"];
will give you original REQUEST_URI
$_SERVER["REDIRECT_URL"];
will give you redirected URL.
Assuming you are just using [L]
in your rewrite rule.
Try $_SERVER['PHP_SELF'] with caveats and some alternatives as well: http://www.mc2design.com/blog/php_self-safe-alternatives
精彩评论