From b6a0bdb80284f446a63011ac7b6c9b572dfb09dd Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Fri, 5 Jun 2009 11:45:18 -0700 Subject: Use ORIG_SCRIPT_PATH if it's available to detect the base url, for compatibility with the CGI sapi. --- application/config/config.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'application') 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 -- cgit v1.2.3