Redirect to another netlify site with nuxt doesn't load correctly

So, inside my Netlify account (same team) I have two different websites.

The main website is:

The detail website is:

On the main website I have a redirect set in the netlify.toml

to = ""
status = 200

I need the URL in the address bar to remain unchanged, but the detail website should be served.

The redirect is working and the URL remains the same. However, the page that is living on the second URL is not working properly.

It returns several 404 on images, .js files and so on. Only the static HTML is rendered. If I visit the second website directly, everything works just fine.

Both websites run a Nuxt website.

What am I missing here?

Hi @Jeffrey1586

Everything works when you visit directly, but not when proxying via because (by default) Nuxt builds a site thinking visitors will access it via the domain root (/.) As you wish to access it via a different path (/gameroom/wtf/) you would need to change the base directory for the production site.

This has the downside of the site no longer working at the root of the domain i.e. Rather than accessing it via it would live at too. This is fine if you don’t want anyone directly accessing the site via this domain.

But it does find the static file. So somehow, the proxy is working, it just has troubles with external files.

When you load the site hosted at from your main site via the issue is that images and other assets won’t load. This is because all path such as

<img src="/WTF_welcome.jpg" class="welcomeIMG relative z-10" data-v-320f08fa="">

become relative to the main site not the second site This is why requests to these assets show as 404 Not Found

1 Like