I want to deliberately throw an arbitrary error. Something appropriate between the
</LocationMatch> directorives. e.g.:
<LocationMatch "^/myurl/.+"> ThrowError 503 </LocationMatch> <LocationMatch "^/anotherurl/.+"> ThrowError 504 </LocationMatch> <LocationMatch "^/safeurl/"> # not throwing an error from this path Options +Indexes </LocationMatch>
What can I use instead of
ThrowError 503? I want to force the server to tell the user whatever error code I choose (e.g. 404, 403, 501, etc) as a means of testing my rules. Worst case I'd like a message written to the
error_log if I cannot actually throw an error at the browser.
I'm aware I could possibly use
mod_rewrite to perform a
RewriteRule .* - [R=503,L] however I want to just use the core modules (I do not have
mod_rewrite compiled into my Apache).
Update: have discovered I can say
RedirectMatch 410 . which will report a "Gone" message to the user as one potential solution.