After splitting media|proxy to seperate domain, old uplods point to previous domain

As I went through the update process of the 2024.03 I split media and proxy to different domain, however seems like only newly uploaded files are accessible via new link. Everything prior the update still points to old url which of course now returns 404. Is there anything I’m missing? I suspect PEBKAC here:
I pulled new version, run migrations as always. I haven’t seen anything extra apart from usual update procedure and changes to nginx vhosts.
Would appreciate any pointers. Thanks a lot.

this is normal, you’ve just gotta add a redirect in your nginx config - we don’t include it by default because ideally new users won’t ever have to use it

an example configuration might be:

# this is your main nginx  server file
server {
... other stuff ....
  location ~ ^/(media) {
    rewrite ^/(.*)$ http://media.domain.com/$1 permanent;
 }
}

(note that i don’t actually use nginx so this might be mildly off, but should do the job i hope

This is what I have in my Nginx config, not sure where I got the snippet from but here it is:

        location ~ ^/(media|proxy) {
                return 301 https://media.example$request_uri;
        }

@norm @FloatingGhost Ok. Now I understand where the confusion comes from. In the beginning I had the redirect set, but I read it the update thread on the forum that I should rather replace it with just returning 404 so I assumed the previous proposed rewrite solution here was no longer needed and things have been somewhat solved.
Thanks a lot for clearing it out.

1 Like