Hi
Let’s start with a bit of context, I have created a statically generated blog that we want to display as a subfolder of our website hosted elsewhere. (Blog | 360Learning)
I am not very experimented on this subject but I understood that I needed to deploy the blog on the main domain and proxy requests that are meant for the website from Netlify.
Here are the redirects rules that I added to netlify.toml
[[redirects]]
from = "/blog*"
to = "/blog:splat"
status = 200
force = false
[[redirects]]
from = "/*"
to = "http://website.360mooc.com/:splat"
status = 200
force = true
headers = {X-From = "Netlify", X-Forwarded-Host = "360mooc.com"}
However, when I tried accessing the base route (https://360mooc.com) after that, netlify responded with a 301 redirect instead of a 200 proxy.
age: 32
content-length: 178
content-type: text/html
date: Wed, 10 Jun 2020 13:36:33 GMT
location: https://website.360mooc.com/
server: Netlify
status: 301
x-content-type-options: nosniff
x-nf-request-id: 35132e8a-bef8-4da2-896b-cbae76fec0ee-3441662
I have tried redeploying and clearing my local cache and the cache of Netlify
EDIT: The weird thing is that the redirects work as intended on my netlify subdomain https://360mooc.netlify.app/
Does anyone know what could be the issue here?