Changeset 2177
- Timestamp:
- 02/27/2008 12:47:04 PM (11 months ago)
- Location:
- trunk
- Files:
-
- 2 modified
-
application/config/config.php (modified) (1 diff)
-
system/helpers/url.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/application/config/config.php
r2003 r2177 2 2 /** 3 3 * Domain name, with the installation directory. Default: localhost/kohana/ 4 * If this starts with a /, Kohana will try to get the domain from HTTP_HOST 5 * from the web server. 4 6 */ 5 7 $config['site_domain'] = 'localhost/kohana/'; -
trunk/system/helpers/url.php
r2017 r2177 22 22 { 23 23 $protocol = ($protocol == FALSE) ? Config::item('core.site_protocol') : strtolower($protocol); 24 // try to auto-detect protocol 25 empty($protocol) AND $protocol = (isset($_SERVER['HTTPS']) AND ($_SERVER['HTTPS'] != '')) ? 'https' : 'http'; 24 26 25 $base_url = $protocol.'://'.Config::item('core.site_domain', TRUE); 26 27 $site_domain = Config::item('core.site_domain', TRUE); 28 // Add current servername if site_domain starts with a / 29 (strlen($site_domain) > 0 AND $site_domain[0] == '/') AND $site_domain = $_SERVER['HTTP_HOST'].$site_domain; 30 31 // if site_domain is empty, no base url. This results in 32 // a relative path (eg, "index.php/") being returned 33 $base_url = (!empty($site_domain)) ? $protocol.'://'.$site_domain : ''; 34 27 35 if ($index == TRUE AND $index = Config::item('core.index_page')) 28 36 {
