Using href in both work and production sites

A question about href prefix

We have a documentation site that we want to host in production under a subfolder of our domain (
The href prefix (/learn) seems like a good solution to this but our problem is that when we publish to all internal links are broken.
For example, a link from page A to page B (page link) translates in the generated HTML as href=‘/learn/B’. This works fine when browsing our domain ( but will result in 404 when browsing the site since B is hosted at /B.

It’s important to note that we use the site as staging and publish to for production. Meaning that we want to be able to browse and have it functional before we approve changes and update

Can we use href prefix in a way that will work for both published sites? Is there a different solution?

Asaf from Code Ocean

Here is my public share link: LINK
(how to access public share link)

I suggest using a subdomain instead of a subfolder.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.