Redirect rules for page specific SEO tags

I’m trying to have custom SEO meta tags for different pages. I have the following structure in dist/ which is the deployment directory.


index.html has the generic meta tags. Every index.html in /video/:videoId is the same index.html but with video-specific meta tags.

I have the following rules in the _redirects file.
/video/:videoId /video/:videoId/index.html 200
/* index.html 200

The problem is that when I visit the url<videoId>, the correct index.html with video specific meta tags are returned. But, the browser doesnt render the page.
It just shows a blank page.

I dont understand what’s wrong with the approach that I’m taking. Any help is much appreciated.

Nevermind, found the answer myself.

The index.html returned from /video/<videoId didn’t contain the app.js or chunk-vendors.js, as those are injected to public/index.html after the build by webpack.

Glad you found the answer. If you are using react, you could consider taking a look at react-helmet to set those meta tags dynamically in your app.