Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
SCRIPT_FILENAMEmod_rewrite和REQUEST_FILENAMEin mod_rewrite有什么区别?
SCRIPT_FILENAME
REQUEST_FILENAME
RewriteCond %{SCRIPT_FILENAME} -f RewriteCond %{SCRIPT_FILENAME} -d
和
RewriteCond %{REQUEST_FILENAME} -f RewriteCond %{REQEUST_FILENAME}
变量 SCRIPT_FILENAME 和 REQUEST_FILENAME 包含相同的值 - Apache HTTP 服务器的内部 request_rec 结构的文件名字段的值。第一个名称是众所周知的 CGI 变量名称,而第二个名称是 REQUEST_URI 的对应名称(其中包含 request_rec 的 uri 字段的值)。
http://httpd.apache.org/docs/trunk/mod/mod_rewrite.html