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

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

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

CC BY-SA 4.0
2019-06-24T07:19:17.507Z
[Give this a read](https://craftcms.stackexchange.com/questions/30732/asset-volume-using-environment-variable-on-file-system-path-as-literal-string-on/30733#30733). Aliases might be the way.
Oli
CC BY-SA 4.0
2019-06-24T07:40:19.080Z
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
<craft3>
Combining env variables with strings in settings
# Combining env variables with strings in settings

(Asked by: username_0 on 2019-06-24)

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`?

**Tags:** craft3

> **Comments:**
> **username_1**: [Give this a read](https://craftcms.stackexchange.com/questions/30732/asset-volume-using-environment-variable-on-file-system-path-as-literal-string-on/30733#30733). Aliases might be the way.  
> **username_0**: 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.  

---

## 0 answers

