Open nickvigilante opened 1 year ago
We have several redirects in place in our docs site: https://www.cockroachlabs.com/docs/_redirects
Here's a sample PR where I demo this: https://github.com/cockroachdb/docs/pull/17482
Here's the deploy preview for the first commit: https://64b54a5e4d48fa000851137c--cockroachdb-docs.netlify.app/docs/managed/quickstart.html
This URL redirects to https://64b54a5e4d48fa000851137c--cockroachdb-docs.netlify.app/docs/cockroachcloud/quickstart.html, which I expect it to do, given that I haven't enabled the edge function.
After I enable it in the second commit: https://64b54ce25e90670007d0bdd8--cockroachdb-docs.netlify.app/docs/managed/quickstart.html
It redirects to https://64b54ce25e90670007d0bdd8--cockroachdb-docs.netlify.app/docs/managed/quickstart, which I expect the .html to be removed from the URL, but I also expect the URL to update from /managed/ to /cockroachcloud/: https://64b54ce25e90670007d0bdd8--cockroachdb-docs.netlify.app/docs/cockroachcloud/quickstart
.html
/managed/
/cockroachcloud/
All of our URLs now seem to do a rewrite/200 when they're on the old URL, which we do not want for SEO purposes. Any way to work around this?
Thank you for making this function!
I actually see that not returning the response allows redirects to process normally, in case anyone runs into this problem in the future. Thanks!
We have several redirects in place in our docs site: https://www.cockroachlabs.com/docs/_redirects
Here's a sample PR where I demo this: https://github.com/cockroachdb/docs/pull/17482
Here's the deploy preview for the first commit: https://64b54a5e4d48fa000851137c--cockroachdb-docs.netlify.app/docs/managed/quickstart.html
This URL redirects to https://64b54a5e4d48fa000851137c--cockroachdb-docs.netlify.app/docs/cockroachcloud/quickstart.html, which I expect it to do, given that I haven't enabled the edge function.
After I enable it in the second commit: https://64b54ce25e90670007d0bdd8--cockroachdb-docs.netlify.app/docs/managed/quickstart.html
It redirects to https://64b54ce25e90670007d0bdd8--cockroachdb-docs.netlify.app/docs/managed/quickstart, which I expect the
.html
to be removed from the URL, but I also expect the URL to update from/managed/
to/cockroachcloud/
: https://64b54ce25e90670007d0bdd8--cockroachdb-docs.netlify.app/docs/cockroachcloud/quickstartAll of our URLs now seem to do a rewrite/200 when they're on the old URL, which we do not want for SEO purposes. Any way to work around this?
Thank you for making this function!