-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature Request: Customized 404 pages (without changing code and recompiling) #62
Comments
I'm not going to send this as a patch myself because I don't need it but as an exercise I added such an option https://gist.github.com/tvlooy/8f5c9253f9e283eaee9a77e9721daa52 |
Love spartan features and behavior of the httpd, but thanks for this request. 404 is IMO the only one error page which have to "communicate" with the user, provide him with, at least, a link to the site home page. Otherwise we lost this user in most cases. |
I throughly agree. I love the minimalist featureset of httpd, but having a fixed 404 error page is not very visitor friendly. |
what I would like is have an option to handle requests with factcgi if the requested location is not a file or directory. Like in Apache:
|
@tvlooy |
@vetelko said everything. This is a small improvement very useful for visitor. Hope to see this in httpd too. |
I agree, this would be very useful. I have a client's new site running on httpd but there are links out there in the wild to pages from their old site that no longer exist. I'd love to be able to give visitors a custom 404 page with a link to the current homepage if they happen to click on them. |
@jsfierro in this case you should try to redirect (if old url structure allows this) user using 301 code from old url to new url or to homepage |
That's that what I'm doing now, but it's kind of tricky. The old site had tons of pages, with lots of duplicate content, non-obvious subdirectory names, etc. I have many of the important ones redirected, but there's a lot I am missing, so a custom 404 to catch those would be great. |
if som logical pattern in old url strcuture is missing than you are right. can't you switch to nginx for now? I doubt custom 404 via directive in httpd.conf will be solved anytime soon :( |
Just want to note that @tvlooy's patch is working brilliantly for me as of 6.3 httpd. Thank you! Hopefully this is looked at for a future release. |
Updated for 6.4: https://gist.github.com/Ranguvar/7fdec9c8f0a55edad4cdabb4c5c59f79 |
I would like the ability to have more control over the system-generated error pages, besides modifying C code myself and recompiling.
In other words, I don't want my "404 Not Found" pages saying, "OpenBSD httpd" at the bottom and using the Comic Sans font.
The nginx approach using the "error_page" keyword to specify a URI for a given HTTP code would be relatively straightforward to implement, I think. If there is nothing in the httpd.conf file for that server and a given return code, then the fall-back could still use the hard-coded version.
The text was updated successfully, but these errors were encountered: