Home
Support Forums

Rewrite home page to another server (reverse proxy)

I’m trying to set a reverse proxy of our website homepage to another server.
Only the homepage should be reversed proxy, the rest of the pages should be served from Netlify (or using other reverse proxies).

I’m using the _redirects file and I’ved tried the following:

/ https://airfleet-2020-frontend.vercel.app 200
/* https://airfleet-2020-frontend.vercel.app:splat 200
/$ https://airfleet-2020-frontend.vercel.app 200

but non of those seems to work.
The website is https://airfleet-website.netlify.app/

Other redirects such as:
/blog/* https://blog.airfleet.co/blog/:splat 200

Works fine in the same file.

I’ve tried to relocate the redirect to the top of the file and the bottom of the file. Same thing.
The redirects are passing validation on Netlify redirects tester.

Any idea?

Thanks!
Elad

The first rule should work if you append an ! at the end. It would look like: / https://airfleet-2020-frontend.vercel.app 200!. You could also try adding a rule for index.html like this: /index.html https://airfleet-2020-frontend.vercel.app 200!

Additionally, you could add the following to your index.html's <head>: <meta http-equiv = "refresh" content = "0; url = https://airfleet-2020-frontend.vercel.app/"/>. However, this would mean a complete redirect and not a proxy.