I run two Apache 2 servers. One has PHP5.2 and the other has PHP5.3. Is there a reason why on the 5.3 machine has $_SERVER['SCRIPT_URI']
?
Where does this variable come from? It is clearly something that is coming through from the Apache environment and it is not documented in the PHP manual. It is however a handy shortcut over a combination of ['HTTPS']
, ['SERVER_NAME']
and ['REQUEST_URI']
.
I have tried looking through configuration files, searching SO and the web.
According to a post on WebHostingTalk it comes from mod_rewrite:
Add
RewriteEngine On
To the virtual host in your httpd.conf file that you want to turn this on for and then restart apache.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With