My site is a rebuild and I need to put permanent '301' redirects in place after fetching some data.
EG. user requests /oldurl/old-reference.
This is routed to a component for handling it. I use asyncConnect to make a call to the API through redux. When this returns I need to make a 301 redirect to the new url: newurl/new-reference-from-api. How do I communicate this back up to server.js after redux receives the data?
All this needs to happen in the initial server side rendering. The old urls are only accessed from external locations such as search engines.
My site is a rebuild and I need to put permanent '301' redirects in place after fetching some data.
EG. user requests
/oldurl/old-reference
.This is routed to a component for handling it. I use asyncConnect to make a call to the API through redux. When this returns I need to make a 301 redirect to the new url:
newurl/new-reference-from-api
. How do I communicate this back up toserver.js
after redux receives the data?All this needs to happen in the initial server side rendering. The old urls are only accessed from external locations such as search engines.