diff options
author | Bharat Mediratta <bharat@menalto.com> | 2009-06-06 02:45:18 +0800 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2009-06-06 02:47:17 +0800 |
commit | 40c4ce1b8a1928f6f771a4c21a3916eadc278442 (patch) | |
tree | 14d65896155101f71e1e2941850f2f4daaa35540 | |
parent | 73a0df1b16605c94be5942f560da5a7bf930b27a (diff) |
Use ORIG_SCRIPT_PATH if it's available to detect the base url, for
compatibility with the CGI sapi.
Signed-off-by: Bharat Mediratta <bharat@menalto.com>
-rw-r--r-- | application/config/config.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/application/config/config.php b/application/config/config.php index 6a30d91c..d274a31b 100644 --- a/application/config/config.php +++ b/application/config/config.php @@ -23,7 +23,8 @@ * then a full URL will be used, eg: http://localhost/kohana/. If it only includes * the path, and a site_protocol is specified, the domain will be auto-detected. */ -$config["site_domain"] = dirname($_SERVER["SCRIPT_NAME"]); +$config["site_domain"] = dirname( + empty($_SERVER["ORIG_SCRIPT_NAME"]) ? $_SERVER["SCRIPT_NAME"] : $_SERVER["ORIG_SCRIPT_NAME"]); /** * Force a default protocol to be used by the site. If no site_protocol is |