Can't serve file with 404 code #1555
Answered
by
cpq
saidg23
asked this question in
Ask questions, get answers
-
I would like to serve a custom 404 page but the file isn't being sent with the right response code.
This does not seem to send the desired response. |
Beta Was this translation helpful? Give feedback.
Answered by
cpq
May 31, 2022
Replies: 1 comment 1 reply
-
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); |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
cpq
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This commit adds the 404 page support: 4dd1891
This is the usage example: