I’m having an issue with relative links when deploying a static website to App Platform.

For example, the https://mvilla.it/fenix/index.html file is available both via https://mvilla.it/fenix and https://mvilla.it/fenix/

The URL without the trailing slash breaks all relative links in the page. Is there a option to always append trailing slashes?


1 comment

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
2 answers

Hi there @matteoSnorkler,

Indeed this seems to be the case, thank you for reporting this. I think that this might not be doable as of the time being. I’ve forwarded this information to the App Platform engineering team.


As another person having the same issue, I would also like to say that, for static websites, allowing the non-existence of a trailing slash is almost unnecessary.

Given that using a static website means the team is unlikely a giant org, they are unlikely at the level to care about the customer’s preference of not having a trailing slash, but more at the level of preventing the website from breaking down. And by not having a trailing slash, the website potentially breaks down, since it affects access to resources through relative paths.

Especially in my case, deploying an webassembly-based webapp as a static website, I have no option but to support relative path, since this decision is forced by emscripten–a webassembly compiler for c++ code that I use.

In conclusion, I think adding this option, and maybe even turning this on for new websites, is likely to benefit people deploying static websites through the app platform.