What is the difference between SCRIPT_FILENAME and REQUEST_FILENAME?

5

I'm studying friendly URLs, and in many instances I came across these two forms of writing:

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

and

RewriteCond %{SCRIPT_FILENAME} !-f
RewriteCond %{SCRIPT_FILENAME} !-d

What's the difference between them? Looking at the Apache documentation I understood that they are the same thing. Did I get it right?

    
asked by anonymous 23.11.2016 / 22:39

1 answer

1

SCRIPT_FILENAME : This is the name of the commonly known CGI variable

REQUEST_FILENAME : This is the appropriate counterpart of REQUEST_URI (which contains the value of the uri field of request_rec).

Both contain the same value.

    
11.01.2017 / 18:55