[wp-hackers] Absolute vs. relative URLs
leonid at mamchenkov.net
Sat Apr 21 13:23:20 GMT 2007
On 4/21/07, Matthias Bauer <moeffju at moeffju.net> wrote:
> On 21.04.2007 14:50 Leonid Mamchenkov wrote:
> > Absolute URLs is about the biggest problem in our
> > development/deployment process for our customer's web sites.
> Aside from the matter of absolute vs. relative URIs, why don't you just
> set up a development server and make an internal DNS entry to point the
> target domain to it, or change your HOSTS file?
Developers aren't all on internal network. Isn't it a common thing now?
> Or develop on the target server in a subdirectory, then change the
> document root when finished,
Target server usually belongs to or administrated by the customer.
> or use rewrite?
That's an ugly option. But an option, yes.
> There are many solutions to your problem that don't
> require changes to the WordPress core.
> Or you could just roll those patches into your deployed versions yourself...
>From the Google search results, it seems that we aren't the only ones
who have the problem with absolute URLs. What's so great about them
There is already a configuration file for the database connectivity.
Numerous other systems keep a URL and a file system path in there too.
It's native, it's what people are used to. If someone, who is not
very familiar with WordPress needs to move it around, he/she can just
edit to lines of config file instead of doing lots of documentation
reading and then performing SQL trickery. With relative URLs, things
like backups, hot standby's, and development/production setups are
trivial. With absolute URLs, these all are a pain.
Absolute URLs really look like a bad decision. Except for when RSS
feeds are involved, but those are easy to take care of.
More information about the wp-hackers