if I have /faq.php
on the server it can also be accessed via /faq.php/nonexistant.gif
why? I have made sure MultiViews are disabled. Why does the contents of /faq.php
get shown when I access the URI /faq.php/randomstuff.gif
? FYI, I have no htaccess file in the same directory.
相关问题
- Views base64 encoded blob in HTML with PHP
- Laravel Option Select - Default Issue
- PHP Recursively File Folder Scan Sorted by Modific
- Can php detect if javascript is on or not?
- Using similar_text and strpos together
That is called
path_info
. You can disable it usingAcceptPathInfo Off
in the apache config. People generally use it as a fake mod rewrite when mod rewrite is not availalble.http://httpd.apache.org/docs/2.2/mod/core.html#acceptpathinfo
/nonexistant.gif
will be HTTP "PATH_INFO": http://www.ietf.org/rfc/rfc3875, section 4.1.5Basically, the webserver will scan "down" a url until it hits an actual file. Anything after that file in the url becomes PATH_INFO.