[PATCH] Allow files to be used as document-root
|Category:||-||Estimated time:||1.00 hour|
|Missing in 1.5.x:||No|
A very convenient feature of Apache is that you can set a file as your document root, effectively allowing you to route all requests to a single .php file (with the path as path_info).
Note that this is functionally different from using mod_rewrite, as PATH_TRANSLATED and PHP_SELF will have different values. This means that in the case of mod_rewrite, PHP will think it was loaded using /index.php (and will use this as the base for constructing self-urls) whereas with a file as document-root PHP_SELF is "/" and php will be able to deduce the actual URL that was used.
More convenient and more correct. The patch is a single change (a >= instead of a >).
Also available in: Atom