Reputation: 61
where is it possible to change the baseURL on Silverstripe v4? Also after rewrite the base tag with http is set at the website. I would like to specify the baseURL itself, which will be applied to all pages (front site, admin).
Thanks for every tip
Upvotes: 2
Views: 1972
Reputation: 4424
It's good practice to set the base URL in the .env
environment file so you can set separate base URLs for local development/ staging/ production etc.
We use the following line in the /.env
file:
SS_BASE_URL="https://example.com/"
And then add the following to /app/_config/mysite.yml
:
SilverStripe\Control\Director:
alternate_base_url: '`SS_BASE_URL`'
Upvotes: 4
Reputation: 1024
You can set an alternating base URL like so:
_config/config.yml
SilverStripe\Control\Director:
alternate_base_url: 'your/base/url/'
Upvotes: 3