Make WordPress Core


Ignore:
Timestamp:
08/27/2004 05:20:59 AM (20 years ago)
Author:
rboren
Message:

Eliminate use of DOCUMENT_ROOT. Look for .htaccess in 'home'.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/templates.php

    r1503 r1567  
    9898
    9999    $home = get_settings('home');
    100     if ($home != '' && ('index.php' == $file || get_settings('blogfilename') == $file)) {
    101         $home_root = str_replace('http://', '', $home);
    102         $home_root = preg_replace('|([^/]*)(.*)|i', '$2', $home_root);
    103         $real_file = $_SERVER['DOCUMENT_ROOT'] . $home_root . '/' . $file;
     100    if (($home != '' && $home != get_settings('siteurl')) &&
     101      ('index.php' == $file || get_settings('blogfilename') == $file ||
     102       '.htaccess' == $file)) {
     103        $home_root = parse_url($home);
     104    $home_root = $home_root['path'];
     105    $root = str_replace($_SERVER["PHP_SELF"], '', $_SERVER["PATH_TRANSLATED"]);
     106    $home_root = $root . $home_root;
     107        $real_file = $home_root . '/' . $file;
    104108    } else {
    105109        $file = validate_file($file);
Note: See TracChangeset for help on using the changeset viewer.