Project

General

Profile

Actions

Feature #2475

closed

[PATCH] Allow files to be used as document-root

Added by wsl about 11 years ago. Updated over 10 years ago.

Status:
Fixed
Priority:
Normal
Category:
-
Target version:
ASK QUESTIONS IN Forums:

Description

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 >).


Files

file-as-docroot.patch (628 Bytes) file-as-docroot.patch wsl, 2013-02-15 13:05
Actions #1

Updated by stbuehler over 10 years ago

  • Target version set to 1.4.x
Actions #2

Updated by stbuehler over 10 years ago

  • Target version changed from 1.4.x to 1.4.33
Actions #3

Updated by stbuehler over 10 years ago

simple workaround:

alias.url = ("" => server.document-root )
Actions #4

Updated by stbuehler over 10 years ago

  • Status changed from New to Fixed
  • % Done changed from 0 to 100

Applied in changeset r2900.

Actions

Also available in: Atom