0

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.

l0b0
  • 1,140
  • 1
  • 8
  • 17

1 Answers1

0

Turns out this isn't too difficult:

ErrorDocument 403 /unauthorized_remote_access
Redirect 404 /unauthorized_remote_access
l0b0
  • 1,140
  • 1
  • 8
  • 17