Skip to content

Can't serve file with 404 code #1555

May 19, 2022 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

This commit adds the 404 page support: 4dd1891

This is the usage example:

      struct mg_http_serve_opts opts = {
        .root_dir = "./web_root",
        .page404 = "./web_root/404.html",
      };
      mg_http_serve_dir(c, hm, &opts);

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@saidg23
Comment options

Answer selected by cpq
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants