I\’m doing some testing with my sites .htaccess file to block malicious attacks such as if a request comes in for http://mysite.com/somepage.html//malicious_attempt.php
So for these attempts I want to serve a 403 error instead of the 404.
In my root .htaccess file I add the following
RedirectMatch 403 \/\/
This is not working any 403 error still gets redirected to the 404 page. Even if I change the string to try and match anything on my site such as a legitimate page, instead of receiving a 403 error it gets directed to a 404.
Even if I try a RewriteRule using the [F,L] flags it still gets directed to a 404.
Anyone have any suggestions?