# Multisite + rewrites question

**URL:** https://discourse.roots.io/t/multisite-rewrites-question/15454
**Category:** trellis
**Created:** 2019-05-02T18:06:03Z
**Posts:** 2

## Post 1 by @mgargano — 2019-05-02T18:06:03Z

I inherited a multisite that I re-architected into Trellis and I want to rewrite `https://subsite1.com/wp-content/uploads/sites/4/2018/(.*)` to `https://subsite1.com/app/uploads/sites/4/2018/$1`. I want to do this instead of making direct changes to the DB because there are external links on external sites relying on the URL with `/wp-content/` Typically on single sites I just added a file to `/trellis/nginx-includes/subsite1.com/rewrites.conf.j2` and added in something like:

```
rewrite ^/wp-content/uploads/(.*)$ "/app/uploads/$1" last;
```

This is not working, and I’m not sure why. My multisite “main” site is `multisite.site.com` and my wordpress\_sites.yml looks like…

```
multisite.site.com:
    site_hosts:
      - canonical: multisite.site.com
      - canonical: subsite1.com
      	redirects:
      		- www.subsite1.com
```

How can I add a rewrite like the one above for the subsite?

---

## Post 2 by @system — 2019-06-13T18:11:53Z

This topic was automatically closed after 42 days. New replies are no longer allowed.
