Browser refresh shows "page not found" error, when viewing single-spa routed page

Hi,

I have a dropdown that I use to access a routed page.
image

I can see the page route is present in the routes.
image

When I click on the dropdown button the page loads without issue.

My problem is, If I hit the browser refresh button or F5, I get error 404 on the same page.

Would anyone know why this would be?

Thanks,
Ray.

Are you sure this is the correct URL?
Isn’t the /allcompletedorders/ a page route for the /admindashboard/ page?

Also - what server model are you using?

Hi Teodor,

It’s ASP.NET on IIS.

Yes, I’m sure it’s the right route OR I am doing something completely wrong.

/admindashboard/ is a route to URL /admindashboard.aspx

image

On this page /admindashboard.aspx I have page routes.

And you can see here that page route /allcompletedorders/ goes to _allcompletedorders.aspx
image

Thanks,
Ray

If your route in routes panel is: /admindashboard/ then all page routes loaded for this page need to have urls like:

yoursite.com/admindashboard/allcompletedorders/

instead of

yoursite.com/allcompletedorders/

as these are page routes i.e. sub-routes for this main page admindashboard included on it.
Not sure how did you create the URLs / links to your page routes? Is it in a navbar or?

OK, Thanks, found the issue.

Yes, it was a Navbar.

And them I select the page route.

I just noticed this time that the URL is now different when I select the page route.

Previously.
image

Now.
image

So this time there is an apostrophe present. Once deployed the url then looks as you explained.
image

Thanks for pointing me in the right direction.

Ray.

1 Like

Yes, page routes should start with a dot ./

1 Like