How do I setup Apache to return a 204(no-content) instead of a 404 code for a certain URL?
Putting together the Redirect documentation with the RedirectMatch documentation, we see that yes, we can send a custom 204 back. Here is a quick example that responds with 204 to any request matching foo with any characters after it.
#RedirectMatch example using mod_alias
RedirectMatch 204 foo(.*)$
from here http://www.lowlevelmanager.com/2009/07/returning-apache-204.html