I am trying to overwrite HTTP Header response code to another response code using .htaccess.
I want to change
HTTP
404
to200 OK
HTTP
403
to200 OK
.htaccess code :
RewriteEngine On
#ErrorDocument
ErrorDocument 403 /forbidden.html
ErrorDocument 404 /notfound.html
ErrorDocument 500 /servererror.html
# Disable directory browsing
Options -Indexes
#Change status code to 200 OK
<IfModule mod_headers.c>
<If "%{REQUEST_STATUS} in { '404','403', '500' }">
Header set HTTP/1.1 "200 OK"
Header set HTTP/2 "200 OK"
</If>
</IfModule>
Using PHP it easy : header("Status: 200 OK");
But i want to do this using .htaccess. Any idea how can we overwrite HTTP response code
Note : i am not looking for redirect.