On 05/02/15 01:46, Edgar Pettijohn III wrote:
On May 1, 2015, at 6:09 PM, Daniel Melameth wrote:
On Fri, May 1, 2015 at 3:09 PM, Kevin <spy...@gmail.com> wrote:
How does one go about specifying a custom 404 page w/the new httpd?
This seems like the correct directive:
error_page 404 /some/path/404.html
Yet it am no workie for me when I specify it thusly:
listen on 192.168.2.10 port 80
root "/htdocs/example.com"
error_page 404 /404.html
[In fact, adding that error_page line makes httpd not (re)start]
I have a similar issue. You can see my entire 1 post thread at
http://marc.info/?l=openbsd-misc&m=142982719328262&w=2.
I haven't tested yet but I think it is as so:
block return 404 "http://www.example.com/"
I'm pretty sure that's for 3XX replies only. AFAIK, there is no such
thing as error_page or the like implemented at this point.
You could probably achieve something similar, bar the original URI and
the 404 code itself, using
block return 302 "http://example.com/404.html"
Also, there's $QUERY_STRING and friends. See 'man httpd.conf'.
/Alexander