Move from adding BASE_URL to every link to using a single <base> tag
Make BASE_URL a FQDN. Lose ASSETS_URL. Add a <base> tag and drop <?=BASE_URL?> prefixes from links.