[wp-trac] [WordPress Trac] #17048: URLs delivered to the browser should be root-relative
WordPress Trac
wp-trac at lists.automattic.com
Thu Aug 25 03:28:30 UTC 2011
#17048: URLs delivered to the browser should be root-relative
-----------------------------+-------------------------
Reporter: dmole | Owner: edwardw
Type: feature request | Status: closed
Priority: normal | Milestone:
Component: General | Version: 3.1
Severity: normal | Resolution: maybelater
Keywords: close |
-----------------------------+-------------------------
Comment (by SergeyBiryukov):
Replying to [comment:37 dmole]:
> In that case can you provide an example of the 2 URLs you visit your WP
install with and what code you used to get it to work, and where you put
the code?
I mainly use them for local development.
Suppose production site is example.com.
To create a local copy, I import the database, copy `wp-content` and put
this into `wp-config.php`:
{{{
define( 'WP_HOME', 'http://'. $_SERVER['HTTP_HOST'] );
define( 'WP_SITEURL', 'http://'. $_SERVER['HTTP_HOST'] );
}}}
Which allows me to use any domain pointing to that directory (e.g.
example.projects).
I'm not sure if these constants will actually help you to achieve your
goals with this ticket. Maybe not, so `add_filter('site_url', ...)` works
better for you. I only commented because it's a valid way to redefine
`home` and `siteurl` values in some scenarios.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/17048#comment:39>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list