1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6606],{3249:function(i,s,e){(window.__NEXT_P=window.__NEXT_P||[]).push(["/framework-guides/static-routing",function(){return e(5849)}])},5849:function(i,s,e){"use strict";e.r(s),e.d(s,{useTOC:function(){return d}});var h=e(4512),n=e(8542),t=e(6827),r=e(266),l=e(7641);function d(i){return[{value:"Choose the routing policy",id:"choose-the-routing-policy",depth:2},{value:"Configure nginx for generated pages",id:"configure-nginx-for-generated-pages",depth:2},{value:"Build the site with the config",id:"build-the-site-with-the-config",depth:2},{value:"Verify HTTP responses",id:"verify-http-responses",depth:2}]}s.default=(0,n.c)(function(i){let{toc:s=d(i)}=i,e={a:"a",code:"code",h1:"h1",h2:"h2",p:"p",pre:"pre",span:"span",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,r.a)(),...i.components};return(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(e.h1,{children:"Static routes and 404s"}),"\n",(0,h.jsxs)(e.p,{children:["A generated content site should serve each routeâs HTML and return HTTP 404 for a missing page. New lizardpack builds for Astro static, Docusaurus, VitePress, Hugo, and SvelteKit adapter-static use that policy. React and Vue SPAs keep the ",(0,h.jsx)(e.code,{children:"index.html"})," fallback needed by browser routers."]}),"\n",(0,h.jsx)(e.p,{children:"The custom configuration below is optional. Use it for a routing policy that the detected framework does not provide. Existing images keep their old rules until you rebuild them."}),"\n",(0,h.jsx)(e.h2,{id:s[0].id,children:s[0].value}),"\n",(0,h.jsxs)(e.table,{children:[(0,h.jsx)(e.thead,{children:(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.th,{children:"App type"}),(0,h.jsx)(e.th,{children:"Route behavior"})]})}),(0,h.jsxs)(e.tbody,{children:[(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"React or Vue SPA"}),(0,h.jsxs)(e.td,{children:["A valid client route loads ",(0,h.jsx)(e.code,{children:"index.html"}),", then the client router renders it."]})]}),(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"Generated documentation or content"}),(0,h.jsx)(e.td,{children:"A route resolves to its generated HTML; an unknown path returns HTTP 404."})]}),(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"Server-rendered app"}),(0,h.jsx)(e.td,{children:"The application server resolves routes and returns the status."})]})]})]}),"\n",(0,h.jsx)(e.p,{children:"An SPA catch-all view can show a missing-page message, but browser code cannot change the HTTP status of the HTML response already sent. If you need route-aware HTTP status for an SPA, use a server or prerendered route setup that knows which paths exist."}),"\n",(0,h.jsx)(e.h2,{id:s[1].id,children:s[1].value}),"\n",(0,h.jsxs)(e.p,{children:["Create ",(0,h.jsx)(e.code,{children:"nginx.conf"})," at the application root:"]}),"\n",(0,h.jsx)(e.pre,{tabIndex:"0","data-language":"nginx","data-word-wrap":"",children:(0,h.jsxs)(e.code,{children:[(0,h.jsxs)(e.span,{children:[(0,h.jsx)(e.span,{style:{"--shiki-dark":"#34D399","--shiki-light":"#03070E"},children:"server"}),(0,h.jsx)(e.span,{style:{"--shiki-dark":"#E9EDF4","--shiki-light":"#03070E"},children:" {"})]}),"\n",(0,h.jsxs)(e.span,{children:[(0,h.jsx)(e.span,{style:{"--shiki-dark":"#34D399","--shiki-light":"#03070E"},children:" listen "}),(0,h.jsx)(e.span,{style:{"--shiki-dark":"#D4A574","--shiki-light":"#03070E"},children:"80"}),(0,h.jsx)(e.span,{style:{"--shiki-dark":"#858B94","--shiki-light":"#03070E"},children:";"})]}),"\n",(0,h.jsxs)(e.span,{children:[(0,h.jsx)(e.span,{style:{"--shiki-dark":"#34D399","--shiki-light":"#03070E"},children:" server_name "}),(0,h.jsx)(e.span,{style:{"--shiki-dark":"#E9EDF4","--shiki-light":"#03070E"},children:"_"}),(0,h.jsx)(e.span,{style:{"--shiki-dark":"#858B94","--shiki-light":"#03070E"},children:";"})]}),"\n",(0,h.jsxs)(e.span,{children:[(0,h.jsx)(e.span,{style:{"--shiki-dark":"#34D399","--shiki-light":"#03070E"},children:" root "}),(0,h.jsx)(e.span,{style:{"--shiki-dark":"#E9EDF4","--shiki-light":"#03070E"},children:"/usr/share/nginx/html"}),(0,h.jsx)(e.span,{style:{"--shiki-dark":"#858B94","--shiki-light":"#03070E"},children:";"})]}),"\n",(0,h.jsxs)(e.span,{children:[(0,h.jsx)(e.span,{style:{"--shiki-dark":"#34D399","--shiki-light":"#03070E"},children:" index "}),(0,h.jsx)(e.span,{style:{"--shiki-dark":"#E9EDF4","--shiki-light":"#03070E"},children:"index.html"}),(0,h.jsx)(e.span,{style:{"--shiki-dark":"#858B94","--shiki-light":"#03070E"},children:";"})]}),"\n",(0,h.jsx)(e.span,{children:" "}),"\n",(0,h.jsxs)(e.span,{children:[(0,h.jsx)(e.span,{style:{"--shiki-dark":"#34D399","--shiki-light":"#03070E"},children:" location"}),(0,h.jsx)(e.span,{style:{"--shiki-dark":"#E9EDF4","--shiki-light":"#03070E"},children:" / {"})]}),"\n",(0,h.jsxs)(e.span,{children:[(0,h.jsx)(e.span,{style:{"--shiki-dark":"#34D399","--shiki-light":"#03070E"},children:" try_files "}),(0,h.jsx)(e.span,{style:{"--shiki-dark":"#858B94","--shiki-light":"#03070E"},children:"$uri"}),(0,h.jsx)(e.span,{style:{"--shiki-dark":"#858B94","--shiki-light":"#03070E"},children:" $uri"}),(0,h.jsx)(e.span,{style:{"--shiki-dark":"#E9EDF4","--shiki-light":"#03070E"},children:".html "}),(0,h.jsx)(e.span,{style:{"--shiki-dark":"#858B94","--shiki-light":"#03070E"},children:"$uri"}),(0,h.jsx)(e.span,{style:{"--shiki-dark":"#E9EDF4","--shiki-light":"#03070E"},children:"/ "}),(0,h.jsx)(e.span,{style:{"--shiki-dark":"#D4A574","--shiki-light":"#03070E"},children:"=404"}),(0,h.jsx)(e.span,{style:{"--shiki-dark":"#858B94","--shiki-light":"#03070E"},children:";"})]}),"\n",(0,h.jsx)(e.span,{children:(0,h.jsx)(e.span,{style:{"--shiki-dark":"#E9EDF4","--shiki-light":"#03070E"},children:" }"})}),"\n",(0,h.jsx)(e.span,{children:" "}),"\n",(0,h.jsxs)(e.span,{children:[(0,h.jsx)(e.span,{style:{"--shiki-dark":"#34D399","--shiki-light":"#03070E"},children:" error_page "}),(0,h.jsx)(e.span,{style:{"--shiki-dark":"#D4A574","--shiki-light":"#03070E"},children:"404"}),(0,h.jsx)(e.span,{style:{"--shiki-dark":"#E9EDF4","--shiki-light":"#03070E"},children:" /404.html"}),(0,h.jsx)(e.span,{style:{"--shiki-dark":"#858B94","--shiki-light":"#03070E"},children:";"})]}),"\n",(0,h.jsxs)(e.span,{children:[(0,h.jsx)(e.span,{style:{"--shiki-dark":"#34D399","--shiki-light":"#03070E"},children:" location"}),(0,h.jsx)(e.span,{style:{"--shiki-dark":"#34D399","--shiki-light":"#03070E"},children:" ="}),(0,h.jsx)(e.span,{style:{"--shiki-dark":"#E9EDF4","--shiki-light":"#03070E"},children:" /404.html "}),(0,h.jsx)(e.span,{style:{"--shiki-dark":"#E9EDF4","--shiki-light":"#03070E"},children:"{"})]}),"\n",(0,h.jsxs)(e.span,{children:[(0,h.jsx)(e.span,{style:{"--shiki-dark":"#34D399","--shiki-light":"#03070E"},children:" internal"}),(0,h.jsx)(e.span,{style:{"--shiki-dark":"#858B94","--shiki-light":"#03070E"},children:";"})]}),"\n",(0,h.jsx)(e.span,{children:(0,h.jsx)(e.span,{style:{"--shiki-dark":"#E9EDF4","--shiki-light":"#03070E"},children:" }"})}),"\n",(0,h.jsx)(e.span,{children:(0,h.jsx)(e.span,{style:{"--shiki-dark":"#E9EDF4","--shiki-light":"#03070E"},children:"}"})})]})}),"\n",(0,h.jsxs)(e.p,{children:["This supports both ",(0,h.jsx)(e.code,{children:"guide.html"})," and ",(0,h.jsx)(e.code,{children:"guide/index.html"})," output layouts. Include a generated ",(0,h.jsx)(e.code,{children:"404.html"})," if you want a custom error page. Otherwise omit the ",(0,h.jsx)(e.code,{children:"error_page"})," and exact-location blocks to use nginxâs default error body. Keep one canonical URL style in the siteâs links and sitemap; this lookup rule does not add canonical redirects."]}),"\n",(0,h.jsx)(e.h2,{id:s[2].id,children:s[2].value}),"\n",(0,h.jsxs)(e.p,{children:["Use this complete Dockerfile for an npm project with a committed lockfile. Change ",(0,h.jsx)(e.code,{children:"BUILD_SCRIPT"})," and ",(0,h.jsx)(e.code,{children:"OUTPUT_DIR"})," defaults to match the table below:"]}),"\n",(0,h.jsx)(e.pre,{tabIndex:"0","data-language":"dockerfile","data-word-wrap":"",children:(0,h.jsxs)(e.code,{children:[(0,h.jsxs)(e.span,{children:[(0,h.jsx)(e.span,{style:{"--shiki-dark":"#34D399","--shiki-light":"#03070E"},children:"FROM"}),(0,h.jsx)(e.span,{style:{"--shiki-dark":"#E9EDF4","--shiki-light":"#03070E"},children:" node:22-slim "}),(0,h.jsx)(e.span,{style:{"--shiki-dark":"#34D399","--shiki-light":"#03070E"},children:"AS"}),(0,h.jsx)(e.span,{style:{"--shiki-dark":"#E9EDF4","--shiki-light":"#03070E"},children:" build"})]}),"\n",(0,h.jsxs)(e.span,{children:[(0,h.jsx)(e.span,{style:{"--shiki-dark":"#34D399","--shiki-light":"#03070E"},children:"WORKDIR"}),(0,h.jsx)(e.span,{style:{"--shiki-dark":"#E9EDF4","--shiki-light":"#03070E"},children:" /app"})]}),"\n",(0,h.jsxs)(e.span,{children:[(0,h.jsx)(e.span,{style:{"--shiki-dark":"#34D399","--shiki-light":"#03070E"},children:"COPY"}),(0,h.jsx)(e.span,{style:{"--shiki-dark":"#E9EDF4","--shiki-light":"#03070E"},children:" package.json package-lock.json ./"})]}),"\n",(0,h.jsxs)(e.span,{children:[(0,h.jsx)(e.span,{style:{"--shiki-dark":"#34D399","--shiki-light":"#03070E"},children:"RUN"}),(0,h.jsx)(e.span,{style:{"--shiki-dark":"#E9EDF4","--shiki-light":"#03070E"},children:" npm ci"})]}),"\n",(0,h.jsxs)(e.span,{children:[(0,h.jsx)(e.span,{style:{"--shiki-dark":"#34D399","--shiki-light":"#03070E"},children:"COPY"}),(0,h.jsx)(e.span,{style:{"--shiki-dark":"#E9EDF4","--shiki-light":"#03070E"},children:" . ."})]}),"\n",(0,h.jsxs)(e.span,{children:[(0,h.jsx)(e.span,{style:{"--shiki-dark":"#34D399","--shiki-light":"#03070E"},children:"ARG"}),(0,h.jsx)(e.span,{style:{"--shiki-dark":"#E9EDF4","--shiki-light":"#03070E"},children:" BUILD_SCRIPT=build"})]}),"\n",(0,h.jsxs)(e.span,{children:[(0,h.jsx)(e.span,{style:{"--shiki-dark":"#34D399","--shiki-light":"#03070E"},children:"RUN"}),(0,h.jsx)(e.span,{style:{"--shiki-dark":"#E9EDF4","--shiki-light":"#03070E"},children:" npm run "}),(0,h.jsx)(e.span,{style:{"--shiki-dark":"#E9EDF4","--shiki-light":"#03070E"},children:'"$BUILD_SCRIPT"'})]}),"\n",(0,h.jsx)(e.span,{children:" "}),"\n",(0,h.jsxs)(e.span,{children:[(0,h.jsx)(e.span,{style:{"--shiki-dark":"#34D399","--shiki-light":"#03070E"},children:"FROM"}),(0,h.jsx)(e.span,{style:{"--shiki-dark":"#E9EDF4","--shiki-light":"#03070E"},children:" nginx:alpine"})]}),"\n",(0,h.jsxs)(e.span,{children:[(0,h.jsx)(e.span,{style:{"--shiki-dark":"#34D399","--shiki-light":"#03070E"},children:"ARG"}),(0,h.jsx)(e.span,{style:{"--shiki-dark":"#E9EDF4","--shiki-light":"#03070E"},children:" OUTPUT_DIR=dist"})]}),"\n",(0,h.jsxs)(e.span,{children:[(0,h.jsx)(e.span,{style:{"--shiki-dark":"#34D399","--shiki-light":"#03070E"},children:"COPY"}),(0,h.jsx)(e.span,{style:{"--shiki-dark":"#E9EDF4","--shiki-light":"#03070E"},children:" --from=build /app/${OUTPUT_DIR}/ /usr/share/nginx/html/"})]}),"\n",(0,h.jsxs)(e.span,{children:[(0,h.jsx)(e.span,{style:{"--shiki-dark":"#34D399","--shiki-light":"#03070E"},children:"COPY"}),(0,h.jsx)(e.span,{style:{"--shiki-dark":"#E9EDF4","--shiki-light":"#03070E"},children:" nginx.conf /etc/nginx/conf.d/default.conf"})]}),"\n",(0,h.jsxs)(e.span,{children:[(0,h.jsx)(e.span,{style:{"--shiki-dark":"#34D399","--shiki-light":"#03070E"},children:"EXPOSE"}),(0,h.jsx)(e.span,{style:{"--shiki-dark":"#E9EDF4","--shiki-light":"#03070E"},children:" 80"})]})]})}),"\n",(0,h.jsxs)(e.table,{children:[(0,h.jsx)(e.thead,{children:(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.th,{children:"Site"}),(0,h.jsx)(e.th,{children:(0,h.jsx)(e.code,{children:"BUILD_SCRIPT"})}),(0,h.jsx)(e.th,{children:(0,h.jsx)(e.code,{children:"OUTPUT_DIR"})})]})}),(0,h.jsxs)(e.tbody,{children:[(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"Astro static"}),(0,h.jsx)(e.td,{children:(0,h.jsx)(e.code,{children:"build"})}),(0,h.jsx)(e.td,{children:(0,h.jsx)(e.code,{children:"dist"})})]}),(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"Docusaurus"}),(0,h.jsx)(e.td,{children:(0,h.jsx)(e.code,{children:"build"})}),(0,h.jsx)(e.td,{children:(0,h.jsx)(e.code,{children:"build"})})]}),(0,h.jsxs)(e.tr,{children:[(0,h.jsxs)(e.td,{children:["VitePress with a ",(0,h.jsx)(e.code,{children:"docs/"})," root"]}),(0,h.jsx)(e.td,{children:(0,h.jsx)(e.code,{children:"docs:build"})}),(0,h.jsx)(e.td,{children:(0,h.jsx)(e.code,{children:"docs/.vitepress/dist"})})]}),(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"VitePress at the project root"}),(0,h.jsxs)(e.td,{children:[(0,h.jsx)(e.code,{children:"docs:build"})," or your actual script"]}),(0,h.jsx)(e.td,{children:(0,h.jsx)(e.code,{children:".vitepress/dist"})})]}),(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"SvelteKit with adapter-static"}),(0,h.jsx)(e.td,{children:(0,h.jsx)(e.code,{children:"build"})}),(0,h.jsx)(e.td,{children:(0,h.jsx)(e.code,{children:"build"})})]}),(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"Next.js export"}),(0,h.jsx)(e.td,{children:(0,h.jsx)(e.code,{children:"build"})}),(0,h.jsx)(e.td,{children:(0,h.jsx)(e.code,{children:"out"})})]}),(0,h.jsxs)(e.tr,{children:[(0,h.jsx)(e.td,{children:"Nuxt generate"}),(0,h.jsxs)(e.td,{children:[(0,h.jsx)(e.code,{children:"build"})," with ",(0,h.jsx)(e.code,{children:"nuxt generate"})]}),(0,h.jsx)(e.td,{children:(0,h.jsx)(e.code,{children:".output/public"})})]})]})]}),"\n",(0,h.jsxs)(e.p,{children:["Use the generated-pages policy only when the app has those route files. A SvelteKit SPA fallback, for example, needs its own routing policy. ",(0,h.jsx)(e.a,{href:"/framework-guides/nextjs/static-export",children:"Next.js static export"})," has a complete recipe with a trailing-slash layout."]}),"\n",(0,h.jsxs)(e.p,{children:["Exclude dependencies, build output, ",(0,h.jsx)(e.code,{children:".git"}),", and ",(0,h.jsx)(e.code,{children:".env*"})," in ",(0,h.jsx)(e.code,{children:".dockerignore"}),". If the build needs public variables, declare their ",(0,h.jsx)(e.code,{children:"ARG"})," values before the build command. Do not copy private secrets into the image or browser output."]}),"\n",(0,h.jsxs)(e.p,{children:["After ",(0,h.jsx)(e.a,{href:"/framework-guides#prepare-the-project",children:"CLI setup"}),", create a service with ",(0,h.jsx)(e.code,{children:"lizard add --service web"}),", then deploy this source with ",(0,h.jsx)(e.code,{children:"lizard up --service web --port 80"}),". Skip the add step when the service already exists. On an existing service, check ",(0,h.jsx)(e.a,{href:"/concepts/build-pipeline#build-decision-order",children:"build decision order"}),": command overrides can take precedence over the Dockerfile. A config file by itself does not replace the generated nginx configuration; the Dockerfile must copy it into the image."]}),"\n",(0,h.jsx)(e.h2,{id:s[3].id,children:s[3].value}),"\n",(0,h.jsxs)(e.p,{children:["Set ",(0,h.jsx)(e.code,{children:"SITE_URL"})," to the actual local test URL or deployed origin, then replace ",(0,h.jsx)(e.code,{children:"/guide/"})," with a page that exists:"]}),"\n",(0,h.jsx)(e.pre,{icon:l.Fx,tabIndex:"0","data-language":"bash","data-word-wrap":"",children:(0,h.jsxs)(e.code,{children:[(0,h.jsxs)(e.span,{children:[(0,h.jsx)(e.span,{style:{"--shiki-dark":"#858B94","--shiki-light":"#03070E"},children:"SITE_URL"}),(0,h.jsx)(e.span,{style:{"--shiki-dark":"#34D399","--shiki-light":"#03070E"},children:"="}),(0,h.jsx)(e.span,{style:{"--shiki-dark":"#E9EDF4","--shiki-light":"#03070E"},children:"https://YOUR_PUBLIC_HOST"})]}),"\n",(0,h.jsxs)(e.span,{children:[(0,h.jsx)(e.span,{style:{"--shiki-dark":"#D4A574","--shiki-light":"#03070E"},children:"curl"}),(0,h.jsx)(e.span,{style:{"--shiki-dark":"#D4A574","--shiki-light":"#03070E"},children:" -sS"}),(0,h.jsx)(e.span,{style:{"--shiki-dark":"#D4A574","--shiki-light":"#03070E"},children:" -o"}),(0,h.jsx)(e.span,{style:{"--shiki-dark":"#E9EDF4","--shiki-light":"#03070E"},children:" /dev/null"}),(0,h.jsx)(e.span,{style:{"--shiki-dark":"#D4A574","--shiki-light":"#03070E"},children:" -w"}),(0,h.jsx)(e.span,{style:{"--shiki-dark":"#858B94","--shiki-light":"#03070E"},children:" '"}),(0,h.jsx)(e.span,{style:{"--shiki-dark":"#E9EDF4","--shiki-light":"#03070E"},children:"%{http_code}\\n"}),(0,h.jsx)(e.span,{style:{"--shiki-dark":"#858B94","--shiki-light":"#03070E"},children:"'"}),(0,h.jsx)(e.span,{style:{"--shiki-dark":"#858B94","--shiki-light":"#03070E"},children:' "$SITE_URL'}),(0,h.jsx)(e.span,{style:{"--shiki-dark":"#E9EDF4","--shiki-light":"#03070E"},children:"/"}),(0,h.jsx)(e.span,{style:{"--shiki-dark":"#858B94","--shiki-light":"#0
13070E"},children:'"'})]}),"\n",(0,h.jsxs)(e.span,{children:[(0,h.jsx)(e.span,{style:{"--shiki-dark":"#D4A574","--shiki-light":"#03070E"},children:"curl"}),(0,h.jsx)(e.span,{style:{"--shiki-dark":"#D4A574","--shiki-light":"#03070E"},children:" -sS"}),(0,h.jsx)(e.span,{style:{"--shiki-dark":"#D4A574","--shiki-light":"#03070E"},children:" -o"}),(0,h.jsx)(e.span,{style:{"--shiki-dark":"#E9EDF4","--shiki-light":"#03070E"},children:" /dev/null"}),(0,h.jsx)(e.span,{style:{"--shiki-dark":"#D4A574","--shiki-light":"#03070E"},children:" -w"}),(0,h.jsx)(e.span,{style:{"--shiki-dark":"#858B94","--shiki-light":"#03070E"},children:" '"}),(0,h.jsx)(e.span,{style:{"--shiki-dark":"#E9EDF4","--shiki-light":"#03070E"},children:"%{http_code}\\n"}),(0,h.jsx)(e.span,{style:{"--shiki-dark":"#858B94","--shiki-light":"#03070E"},children:"'"}),(0,h.jsx)(e.span,{style:{"--shiki-dark":"#858B94","--shiki-light":"#03070E"},children:' "$SITE_URL'}),(0,h.jsx)(e.span,{style:{"--shiki-dark":"#E9EDF4","--shiki-light":"#03070E"},children:"/guide/"}),(0,h.jsx)(e.span,{style:{"--shiki-dark":"#858B94","--shiki-light":"#03070E"},children:'"'})]}),"\n",(0,h.jsxs)(e.span,{children:[(0,h.jsx)(e.span,{style:{"--shiki-dark":"#D4A574","--shiki-light":"#03070E"},children:"curl"}),(0,h.jsx)(e.span,{style:{"--shiki-dark":"#D4A574","--shiki-light":"#03070E"},children:" -sS"}),(0,h.jsx)(e.span,{style:{"--shiki-dark":"#D4A574","--shiki-light":"#03070E"},children:" -o"}),(0,h.jsx)(e.span,{style:{"--shiki-dark":"#E9EDF4","--shiki-light":"#03070E"},children:" /dev/null"}),(0,h.jsx)(e.span,{style:{"--shiki-dark":"#D4A574","--shiki-light":"#03070E"},children:" -w"}),(0,h.jsx)(e.span,{style:{"--shiki-dark":"#858B94","--shiki-light":"#03070E"},children:" '"}),(0,h.jsx)(e.span,{style:{"--shiki-dark":"#E9EDF4","--shiki-light":"#03070E"},children:"%{http_code}\\n"}),(0,h.jsx)(e.span,{style:{"--shiki-dark":"#858B94","--shiki-light":"#03070E"},children:"'"}),(0,h.jsx)(e.span,{style:{"--shiki-dark":"#858B94","--shiki-light":"#03070E"},children:' "$SITE_URL'}),(0,h.jsx)(e.span,{style:{"--shiki-dark":"#E9EDF4","--shiki-light":"#03070E"},children:"/this-page-does-not-exist"}),(0,h.jsx)(e.span,{style:{"--shiki-dark":"#858B94","--shiki-light":"#03070E"},children:'"'})]})]})}),"\n",(0,h.jsxs)(e.p,{children:["Expect 200 for real pages and 404 for the missing path. If a valid route redirects to its canonical form, inspect the redirect and then verify the destination. Also test an actual asset and a made-up ",(0,h.jsx)(e.code,{children:".js"})," path: a missing script must not return the home page as HTML with status 200."]}),"\n",(0,h.jsx)(e.p,{children:"Finally, open the inner route directly in a browser and reload it. Correct client navigation alone can hide a server routing error. Check the frameworkâs canonical URL and sitemap settings alongside HTTP status before publishing an indexed site."}),"\n",(0,h.jsxs)(e.p,{children:["See ",(0,h.jsx)(e.a,{href:"/framework-guides/validation",children:"tested versions and cloud results"})," for the September 9, 2026 deployment checks and their limits."]})]})},"/framework-guides/static-routing",{filePath:"pages/framework-guides/static-routing.mdx",pageMap:t.v,frontMatter:{description:"Configure static site routes on Lizard: serve generated HTML, support clean URLs, return HTTP 404 for missing pages, and choose when an SPA fallback belongs."},title:"Static routes and 404s"},"undefined"==typeof RemoteContent?d:RemoteContent.useTOC)}},function(i){i.O(0,[8542,6827,2888,9774,179],function(){return i(i.s=3249)}),_N_E=i.O()}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.