How to link directly certain parts of the app with Forge React Routing?

Hello,

I’m trying to add routing to our Confluence Forge app (we use the globalPage module).

I have followed the example that is provided in the documentation: Add routing to a custom UI full page app.

So, routing allows the URL to be manipulated (for example clicking on a link, as described in the example). It also allows the navigation back and forth through the browser back and forward buttons.

But if I try to access a specific part of the app directly thought the URL, it gives a Page not found error.

  1. For example, let’s say our app’s URL is https://mysite.atlassian.net/wiki/apps/85bedc9c-155c-44bb-tqar-4c6d113f3d8b/a8997423-ee65-4787-b1b7-6b2d44932rcw.

  2. Then I click on the Route to page with path link, and the URL gets updated to https://mysite.atlassian.net/wiki/apps/85bedc9c-155c-44bb-tqar-4c6d113f3d8b/a8997423-ee65-4787-b1b7-6b2d44932rcw/page-with-path.

  3. Now, if I try to access that section directly through https://mysite.atlassian.net/wiki/apps/85bedc9c-155c-44bb-tqar-4c6d113f3d8b/a8997423-ee65-4787-b1b7-6b2d44932rcw/page-with-path (for example reloading the page) I get a page not found error.

Does anyone know how to link directly to certain parts of the app?

Thank you.