I’m a newcomer here, and my knowledge is somewhat limited.
Today, I undertook the migration of my Nuxt 3 website from Netlify to the DigitalOcean App Platform. While on Netlify, when a user opened ‘page.com/tricks,’ it would automatically redirect to ‘page.com/tricks/’ with a trailing slash. However, on the DigitalOcean App Platform, ‘page.com/tricks’ simply stays as ‘page.com/tricks,’ which is causing an issue.
I haven’t made any changes to the code, and I’ve deployed the same version here. I would greatly appreciate any assistance with this matter.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
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.
Sign up for Infrastructure as a Newsletter.
Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Hey @rahulkumarsinghwalrus,
Indeed, you are correct this is not configurable out of the box with the App Platform and static sites. There is an option to do this for individual routes but it probably would not fit your needs for this use-case:
It looks like someone has had the same idea before and has posted it on our Product Ideas board. The best thing to do would be to head over and add your vote to it, as well as adding any additional information in the comments for exactly what you’d like to see implemented!
In the meantime what you could do is to use try and configure the
trailingSlash
tofalse
which ensures that Nuxt’s internal routing would not expect the use trailing slashes:Let me know how it goes!
- Bobby.