I have a site with multiple subsites in the following structure: www.site.domain/subsite.

To create multiple subsites, I'd consider setting a base url in the .env (for easy changes: localhost <> live url) and setting the url for each subsite like this $SITE_URL . 'subsite-string'.

Is there any way to achieve this? Or is the only way a full variable per subsite like $SITE_URL_SUBSITE_STRING?

  • 1
    Give this a read. Aliases might be the way.
    – Oli
    Jun 24, 2019 at 7:19
  • 1
    Just what I needed, perfect. If you mind adding that as an answer, I'll mark it as accepted for anyone else with the same question.
    – Bert H
    Jun 24, 2019 at 7:40


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.