There are multiple ways to set the site URL. What is the recommended way?
As of Craft 2, you should be using the new
There are two advantages to setting your site URL using this config setting.
First, The value can be set on a per-locale basis, in a way where Craft is actually aware of all locales’ URLs on every request (unlike the
Its value can also be set directly on a per-environment basis. (Yes you can achieve this using the
Those of course can be combined as well:
protected by Victor In Jul 29 '14 at 18:22
Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.
Would you like to answer one of these unanswered questions instead?