How and where to define BASE_URL in 5.7
Permalinkdefine('BASE_URL', 'http://localhost');
define('DIR_REL', '/mydirrel');
RewriteCond %{HTTP_HOST} ^yourdomain.com [NC] RewriteRule ^(.*)$ http://www.yourdomain.com/$1 [L,R=301]
Of course you need to replace the 'yourdomain.com' part with your own domain name.
In the URL settings in the dashboard you can set the canonical URL to include the www, and then check the box for only using canonical URLs and save your changes. The site will then always redirect to the www before your site.
I have a rather large site in development and I want to make sure I don't need to change all the links within 'content' blocks when it goes live. Will setting base_url solve this? Or is there a way to have links within content block always be relative?