Proxying Assets and Requests Through a Custom Host with Netlify
There are two ways to set up a rewrite rule using Netlify.
netlify.toml
If you’re using a netlify.toml
file, include the following:
[[redirects]] from = "/jamcomments/*" to = "https://go.jamcomments.com/jamcomments/:splat" status = 200
_redirects
When taking the _redirects
approach, it’s a bit simpler:
/jamcomments/* https://go.jamcomments.com/jamcomments/:splat 200
After deployment, all JamComments assets and requests will be routed through your domain as expected.
More Information
See Netlify’s documentation for more information.