How can I get a sitemap from a remote backend?
Unanswered
Brewer's Blackbird posted this in #help-forum
Brewer's BlackbirdOP
Hello, there is a separate frontend and backend. I need to display a sitemap that comes from a specific endpoint https:// {backend url}/sitemap.xml only on the frontend (nextjs) part of the site https:// {frontend url}/sitemap.xml
nextjs 14. Could you give an example of code on how this could be implemented?
nextjs 14. Could you give an example of code on how this could be implemented?
1 Reply
@Brewer's Blackbird Hello, there is a separate frontend and backend. I need to display a sitemap that comes from a specific endpoint https:// {backend url}/sitemap.xml only on the frontend (nextjs) part of the site https:// {frontend url}/sitemap.xml
nextjs 14. Could you give an example of code on how this could be implemented?
[rewrite](https://nextjs.org/docs/app/api-reference/next-config-js/rewrites)
/sitemap.xml to https://backend.com/sitemap.xml