Does Mod Rewrite Change PHP_Self?
Posted on 2006-06-23
If I use mod rewrite to fake .html endings on my php files (i.e. the URL discussion/viewpost=15.html calls the script otherwise located at discussion.php?viewpost=15), and then use $_SERVER['PHP_SELF'] to determine the current URL, will it give me the URL that was typed into the browser window (or clicked on), or the one that is actually being called on the server? In otherwords, will it return discussion/viewpost=15.html or discussion.php?viewpost=15 ?
Normally I would just go and test something like this, but I haven't figured out how to use mod rewrite yet, and I want to know how it is going to affect my scripts once I implement it.