Help me misuse Apache's ErrorDocument directive
February 12, 2010 8:06 AM Subscribe
Is it possible in Apache 2.2 to use ErrorDocument to redirect a page request to something useful, without emitting an error header?
I've been fussing around with mod_headers but can't figure out how to suppress the 404 header and replace it with a 200. Can it be done?
(yes, I realize what I'm trying to do is a little bit perverse and I should really be using mod_rewrite instead. Humor me.)
I've been fussing around with mod_headers but can't figure out how to suppress the 404 header and replace it with a 200. Can it be done?
(yes, I realize what I'm trying to do is a little bit perverse and I should really be using mod_rewrite instead. Humor me.)
Argh, hit send too soon. You might be able to use an asis doc for the error page; I'm not sure if that would trump the server-generated 404 or not.
posted by jquinby at 8:23 AM on February 12, 2010
posted by jquinby at 8:23 AM on February 12, 2010
Best answer: well depending on what your use case is you can maybe do this with a mod_rewrite condition.
This stack overflow question seems to have an answer
posted by bitdamaged at 8:39 AM on February 12, 2010
This stack overflow question seems to have an answer
posted by bitdamaged at 8:39 AM on February 12, 2010
Response by poster: jquinby's answer works; bitdamaged's is probably a more correct way to do it.
Thanks, guys!
posted by ook at 9:01 AM on February 12, 2010
Thanks, guys!
posted by ook at 9:01 AM on February 12, 2010
This thread is closed to new comments.
posted by jquinby at 8:20 AM on February 12, 2010