I am having trouble setting up placeholder redirects so https://data.destinysets.com/i/InventoryItem:1996008488
does an internal rewrite to
https://data.destinysets.com/link_previews/InventoryItem:1996008488
I’m trying to set up pre-rendered pages that contain meta tags for Twitter Cards, Slack Previews, etc. I’m able to use a build script to render the pages and they’re served correctly as expected. What I’m having trouble doing is setting up the redirects so these pages are served correctly. They work locally when using netlify dev
, but not in Netlify’s live environment.
The site is a single page app, and urls follow the format of https://data.destinysets.com/i/[name]:[id]
. Additionally, the URLs can also represent a hierarchy of items, which would look like https://data.destinysets.com/i/[name]:[id]/[name2]:[id2]/[name3]:[id3]/[...etc]
(for example, Destiny Data Explorer). For the purpose of this issue at the moment, I’m only concerned about the first form, with just one item in the URL.
My _redirects
is
/* /index.html 200
/i/:item /link_previews/:item.html 200
When I navigate to Destiny Data Explorer I would expect to see the content of Destiny Data Explorer, with multiple <meta
tags in the <head>
.
Is this supported by Netlify? Am I missing something?