{"id":172,"date":"2026-11-11T16:11:27","date_gmt":"2026-11-11T08:11:27","guid":{"rendered":"https:\/\/getdevioapp.xyz\/?p=172"},"modified":"2026-11-11T16:33:21","modified_gmt":"2026-11-11T08:33:21","slug":"devio-static-site-spa-refresh","status":"publish","type":"post","link":"https:\/\/getdevioapp.xyz\/index.php\/2026\/11\/11\/devio-static-site-spa-refresh\/","title":{"rendered":"\u9759\u6001\u7ad9\u70b9\u9996\u9875\u80fd\u6253\u5f00\uff0c\u5237\u65b0\u5b50\u9875\u9762\u5374 404\uff0c\u5148\u67e5\u8fd9\u51e0\u5904"},"content":{"rendered":"<p>\u9996\u9875\u6ca1\u95ee\u9898\uff0c\u70b9\u8fdb\u53bb\u4e5f\u6b63\u5e38\uff0c\u4e00\u5237\u65b0 \/settings \u5374\u53d8\u6210 404\u3002\u9047\u5230\u8fd9\u79cd\u73b0\u8c61\uff0c\u5148\u8bb0\u4f4f\u51fa\u9519\u7684\u662f\u54ea\u4e2a\u5730\u5740\u3002\u9875\u9762\u8def\u7531\u627e\u4e0d\u5230\u548c JavaScript \u6587\u4ef6\u627e\u4e0d\u5230\uff0c\u867d\u7136\u90fd\u53ef\u80fd\u663e\u793a 404\uff0c\u5904\u7406\u65b9\u6cd5\u5e76\u4e0d\u4e00\u6837\u3002<\/p>\n<h2>\u5148\u786e\u8ba4\u653e\u8fdb\u53bb\u7684\u662f\u6784\u5efa\u7ed3\u679c<\/h2>\n<p>\u5982\u679c\u9879\u76ee\u9700\u8981\u6784\u5efa\uff0c\u5148\u6309\u9879\u76ee\u81ea\u5df1\u7684\u8bf4\u660e\u5b8c\u6210\u6784\u5efa\uff0c\u518d\u68c0\u67e5\u8f93\u51fa\u76ee\u5f55\u91cc\u662f\u5426\u6709\u5165\u53e3 HTML \u548c\u5f15\u7528\u7684\u8d44\u6e90\u3002Devio \u521b\u5efa\u9759\u6001\u7ad9\u70b9\u65f6\u5e94\u9009\u62e9\u5b9e\u9645\u9700\u8981\u63d0\u4f9b\u7ed9\u6d4f\u89c8\u5668\u7684\u76ee\u5f55\uff0c\u800c\u4e0d\u662f\u51ed\u540d\u5b57\u731c\u4e00\u4e2a dist\u3002<\/p>\n<p>\u7528\u6d4f\u89c8\u5668\u6253\u5f00\u9996\u9875\uff0c\u67e5\u770b\u5f00\u53d1\u8005\u5de5\u5177\u7684\u7f51\u7edc\u9762\u677f\u3002\u9875\u9762\u7a7a\u767d\u65f6\uff0c\u5148\u627e\u5931\u8d25\u7684 JS\u3001CSS \u8bf7\u6c42\uff1a\u8bf7\u6c42\u5730\u5740\u3001\u72b6\u6001\u7801\u548c\u54cd\u5e94\u5185\u5bb9\uff0c\u6bd4\u7a7a\u767d\u9875\u9762\u672c\u8eab\u66f4\u80fd\u8bf4\u660e\u95ee\u9898\u3002<\/p>\n<h2>\u53ea\u6709\u524d\u7aef\u8def\u7531\u9700\u8981\u56de\u9000<\/h2>\n<p>\u5355\u9875\u5e94\u7528\u53ef\u80fd\u7531\u6d4f\u89c8\u5668\u91cc\u7684\u8def\u7531\u5668\u5904\u7406 \/settings \u8fd9\u7c7b\u5730\u5740\u3002\u7ad9\u5185\u70b9\u51fb\u65f6\u6ca1\u6709\u91cd\u65b0\u8bf7\u6c42\u6574\u9875\uff1b\u5237\u65b0\u540e\uff0c\u670d\u52a1\u5668\u4f1a\u6536\u5230\u8fd9\u4e2a\u8def\u5f84\uff0c\u5982\u679c\u6ca1\u6709\u5bf9\u5e94\u6587\u4ef6\uff0c\u5c31\u53ef\u80fd\u8fd4\u56de 404\u3002<\/p>\n<p>Devio \u7684\u9759\u6001\u7ad9\u70b9\u652f\u6301 SPA \u8def\u7531\u56de\u9000\u3002\u786e\u8ba4\u9879\u76ee\u4f7f\u7528\u8fd9\u79cd\u8def\u7531\u65b9\u5f0f\u540e\uff0c\u5728\u9759\u6001\u7ad9\u70b9\u7684\u76f8\u5173\u914d\u7f6e\u4e2d\u542f\u7528\u5bf9\u5e94\u529f\u80fd\uff1b\u5165\u53e3\u540d\u79f0\u4ee5\u5f53\u524d\u5e94\u7528\u4e3a\u51c6\u3002\u666e\u901a\u591a\u9875\u7f51\u7ad9\u7f3a\u5c11\u4e00\u4e2a HTML \u6587\u4ef6\u65f6\uff0c\u5e94\u8865\u9f50\u6587\u4ef6\u6216\u4fee\u6b63\u94fe\u63a5\uff0c\u4e0d\u8981\u9760\u56de\u9000\u628a\u6240\u6709\u9519\u8bef\u90fd\u906e\u4f4f\u3002<\/p>\n<h2>\u6309\u8fd9\u4e2a\u987a\u5e8f\u590d\u67e5<\/h2>\n<ol>\n<li>\u76f4\u63a5\u8bbf\u95ee\u9996\u9875\uff0c\u786e\u8ba4\u5165\u53e3\u6587\u4ef6\u80fd\u52a0\u8f7d\u3002<\/li>\n<li>\u4ece\u9996\u9875\u70b9\u51fb\u8fdb\u5165\u4e00\u4e2a\u5b9e\u9645\u5b58\u5728\u7684\u524d\u7aef\u9875\u9762\u3002<\/li>\n<li>\u5728\u8fd9\u4e2a\u5b50\u9875\u9762\u5237\u65b0\uff0c\u518d\u628a\u540c\u4e00\u5730\u5740\u590d\u5236\u5230\u65b0\u6807\u7b7e\u9875\u6253\u5f00\u3002<\/li>\n<li>\u68c0\u67e5\u7f51\u7edc\u9762\u677f\u91cc\u7684 JS\u3001CSS \u548c\u56fe\u7247\u8bf7\u6c42\u662f\u5426\u4ecd\u7136\u6210\u529f\u3002<\/li>\n<\/ol>\n<p>\u5982\u679c\u9875\u9762\u8bf7\u6c42\u6210\u529f\u4e86\uff0c\u811a\u672c\u5374\u62a5\u8bed\u6cd5\u9519\u8bef\uff0c\u6253\u5f00\u811a\u672c\u8bf7\u6c42\u7684\u54cd\u5e94\u770b\u4e00\u773c\uff1a\u5b83\u53ef\u80fd\u62ff\u5230\u4e86 HTML\u3002\u8def\u7531\u56de\u9000\u4e0d\u5e94\u8be5\u88ab\u5f53\u6210\u4fee\u590d\u8d44\u6e90\u8def\u5f84\u7684\u901a\u7528\u529e\u6cd5\u3002\u6309\u9879\u76ee\u6587\u6863\u68c0\u67e5\u6784\u5efa\u65f6\u7684\u8d44\u6e90\u57fa\u7840\u8def\u5f84\uff0c\u5e76\u91cd\u65b0\u6784\u5efa\u3002<\/p>\n<h2>API \u7684 404 \u5355\u72ec\u770b<\/h2>\n<p>\u524d\u7aef\u9875\u9762\u6062\u590d\uff0c\u4e0d\u4ee3\u8868\u540e\u7aef\u63a5\u53e3\u4e5f\u5df2\u7ecf\u63a5\u901a\u3002\u63a5\u53e3\u5730\u5740\u3001\u4ee3\u7406\u76ee\u6807\u548c\u540e\u7aef\u8def\u7531\u4ecd\u9700\u5206\u522b\u6838\u5bf9\u3002\u5c24\u5176\u4e0d\u8981\u770b\u5230\u6240\u6709\u8bf7\u6c42\u90fd\u8fd4\u56de 200 \u5c31\u8ba4\u5b9a\u6210\u529f\uff1a\u672c\u6765\u9700\u8981 JSON \u7684\u63a5\u53e3\uff0c\u5982\u679c\u8fd4\u56de\u9996\u9875 HTML\uff0c\u5e94\u7528\u7167\u6837\u4e0d\u80fd\u6b63\u5e38\u5de5\u4f5c\u3002<\/p>\n<p>\u6539\u914d\u7f6e\u524d\u4fdd\u7559\u539f\u503c\u3002\u786e\u8ba4\u662f\u54ea\u4e00\u5c42\u51fa\u9519\u540e\u518d\u52a8\u624b\uff0c\u6bd4\u540c\u65f6\u6539\u591a\u4e2a\u9009\u9879\u66f4\u5bb9\u6613\u770b\u51fa\u6548\u679c\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u533a\u5206\u7f3a\u5c11\u6587\u4ef6\u3001SPA \u8def\u7531\u56de\u9000\u548c\u8d44\u6e90\u8def\u5f84\u95ee\u9898\uff0c\u4e0d\u7528\u4e00\u9047\u5230 404 \u5c31\u91cd\u88c5\u73af\u5883\u3002<\/p>\n","protected":false},"author":1,"featured_media":199,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[],"class_list":["post-172","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-troubleshooting"],"_links":{"self":[{"href":"https:\/\/getdevioapp.xyz\/index.php\/wp-json\/wp\/v2\/posts\/172","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/getdevioapp.xyz\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/getdevioapp.xyz\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/getdevioapp.xyz\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/getdevioapp.xyz\/index.php\/wp-json\/wp\/v2\/comments?post=172"}],"version-history":[{"count":2,"href":"https:\/\/getdevioapp.xyz\/index.php\/wp-json\/wp\/v2\/posts\/172\/revisions"}],"predecessor-version":[{"id":191,"href":"https:\/\/getdevioapp.xyz\/index.php\/wp-json\/wp\/v2\/posts\/172\/revisions\/191"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/getdevioapp.xyz\/index.php\/wp-json\/wp\/v2\/media\/199"}],"wp:attachment":[{"href":"https:\/\/getdevioapp.xyz\/index.php\/wp-json\/wp\/v2\/media?parent=172"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/getdevioapp.xyz\/index.php\/wp-json\/wp\/v2\/categories?post=172"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/getdevioapp.xyz\/index.php\/wp-json\/wp\/v2\/tags?post=172"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}