[wp-trac] [WordPress Trac] #52575: get_home_path() returns "/" instead of path to WordPress directory

WordPress Trac noreply at wordpress.org
Wed Apr 6 11:50:19 UTC 2022


#52575: get_home_path() returns "/" instead of path to WordPress directory
-------------------------------------------------+-------------------------
 Reporter:  pixellogik                           |       Owner:  (none)
     Type:  defect (bug)                         |      Status:  new
 Priority:  normal                               |   Milestone:  Awaiting
                                                 |  Review
Component:  Filesystem API                       |     Version:  5.6.1
 Severity:  major                                |  Resolution:
 Keywords:  reporter-feedback dev-feedback       |     Focuses:
  close                                          |
-------------------------------------------------+-------------------------

Comment (by lllor):

 I confirm the issue.

 In short, when accessing the website using the index.php in the root
 folder (it happens only when visiting the homepage) the
 {{{
 $_SERVER['SCRIPT_FILENAME']
 }}}
  is loaded with the root folderpath and the subsequent string processing
 performed by get_home_page is not executed correctly. As a workaround, the
 .htaccess should redirect even the / url to the subdirectory/index.php

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/52575#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list