[wp-trac] [WordPress Trac] #29156: $rp_path does not respect SITECOOKIEPATH/COOKIEPATH

WordPress Trac noreply at wordpress.org
Mon Aug 25 21:01:17 UTC 2014


#29156: $rp_path does not respect SITECOOKIEPATH/COOKIEPATH
------------------------------------+-----------------------------
 Reporter:  WALoeIII                |       Owner:
     Type:  defect (bug)            |      Status:  new
 Priority:  normal                  |   Milestone:  4.0
Component:  Login and Registration  |     Version:  trunk
 Severity:  normal                  |  Resolution:
 Keywords:  reporter-feedback       |     Focuses:  administration
------------------------------------+-----------------------------

Comment (by nacin):

 Roughly, home_url() is wherever the homepage is located, while site_url()
 is wherever the site's files are located.

 If you had example.com with WordPress at example.com/wordpress, then
 home_url() would return the former and site_url() would return the latter.
 site_url() is thus used whenever we're targeting a particular file,
 whether that's wp-login.php or in something like includes_url() for
 example.com/wordpress/wp-includes.

 I'd be curious to know what the home and siteurl option values are for the
 various sites. For a post-3.5 multisite setup that puts WP into a
 subdirectory, it should look like this:

  * main site: home url is domain.com, siteurl is domain.com/wordpress
  * additional sites: home url and siteurl are both domain.com/sitename
 (since we require rewrite rules for multisite, we can dynamically rewrite
 things and don't require home url and siteurl to be different)

 siteurl *is* taken to account when setting the cookie because wp-login.php
 would be located at site_url( 'wp-login.php' ). Using REQUEST_URI was a
 matter of not wreaking havoc when someone was doing crazy/weird filtering
 of URLs or whatever.

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


More information about the wp-trac mailing list