Changeset 1567
- Timestamp:
- 08/27/2004 05:20:59 AM (20 years ago)
- Location:
- trunk/wp-admin
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/options-permalink.php
r1535 r1567 19 19 } 20 20 } 21 } 22 23 $home = get_settings('home'); 24 if ($home != '' && $home != get_settings('siteurl')) { 25 $home_path = parse_url($home); 26 $home_path = $home_root['path']; 27 $root = str_replace($_SERVER["PHP_SELF"], '', $_SERVER["PATH_TRANSLATED"]); 28 $home_path = $root . $home_path . "/"; 29 } else { 30 $home_path = ABSPATH; 21 31 } 22 32 … … 48 58 <?php if(isset($_POST['rules'])) { 49 59 $rules = explode("\n", $_POST['rules']); 50 if(insert_with_markers( ABSPATH.'.htaccess', 'WordPress', $rules)) {60 if(insert_with_markers($home_path.'.htaccess', 'WordPress', $rules)) { 51 61 ?> 52 62 <div class="updated" id="htupdate"><p><?php _e('mod_rewrite rules written to .htaccess.'); ?></p></div> … … 137 147 </p> 138 148 <?php 139 if ((! file_exists(ABSPATH.'.htaccess') && is_writable(ABSPATH)) || is_writable(ABSPATH.'.htaccess')) { 149 150 if ((! file_exists($home_path.'.htaccess') && is_writable($home_path)) || is_writable($home_path.'.htaccess')) { 140 151 ?> 141 152 <p class="submit"> -
trunk/wp-admin/templates.php
r1503 r1567 98 98 99 99 $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; 104 108 } else { 105 109 $file = validate_file($file);
Note: See TracChangeset
for help on using the changeset viewer.