404 Not Found error when reloading the page or accessing the URL directly
In the case of SPA configuration, 404 Not Found
error will be returned if you reload or directly access the URL of a dynamically created page because the index.html file cannot be found.
Please try one of the following methods to resolve this issue.
Configuring SSG
If you use SSG configuration, the content is generated in advance on the server, so this issue will not occur. For Nuxt.js, set ssr:true
in nuxt.config.js
.
Refer to Jamstack architecture for the difference between SPA and SSG.
Setting URL Rewrite
If you use SPA configuration, set the URL rewrite in KurocoFront. By setting the following configuration in kuroco_front.js
, the issue will be resolved.
"rewrites": [
{
"source": ".*",
"destination": "/index.html"
}
],
Refer to What is kuroco_front.json? for more information about kuroco_front.js
.
Support
If you have any other questions, please contact us or check out Our Slack Community.