I'm building an API which will only be accessible to local services by using Require local
in the <Location>
directive. How can I make this return a 404 rather than 403 status code when accessed from a remote address? That way I can hide the fact that there is a service at the requested location.
I'd rather preserve the semantics of Require local
than use mod_rewrite
.
Turns out this isn't too difficult: